Welcome Guest, Not a member yet? Register   Sign In
Ajax stops working after first click
#7

[eluser]Kamarg[/eluser]
Remove the $(document).ready() function and replace it with the below code.
Code:
function bindClick() {
  $('<div id="resultdr">').load(
    'searchresults/ajax_nextweek #result_dr',
    function() {
      $(this).hide('#resultdr').replaceAll('#resultdr') ;
    }
  );

  return false;
}

Then anywhere you have
Code:
<a class="nextWeekLink" id="nextweeklink" rel="nofollow" title="search next week">Next Week</a>

add

Code:
onclick="return bindClick();"

It's untested but I think it should do the trick.


Messages In This Thread
Ajax stops working after first click - by El Forum - 03-09-2010, 10:43 AM
Ajax stops working after first click - by El Forum - 03-09-2010, 10:53 AM
Ajax stops working after first click - by El Forum - 03-09-2010, 10:53 AM
Ajax stops working after first click - by El Forum - 03-09-2010, 10:55 AM
Ajax stops working after first click - by El Forum - 03-09-2010, 06:54 PM
Ajax stops working after first click - by El Forum - 03-09-2010, 07:07 PM
Ajax stops working after first click - by El Forum - 03-10-2010, 10:45 AM
Ajax stops working after first click - by El Forum - 03-10-2010, 11:07 AM
Ajax stops working after first click - by El Forum - 03-10-2010, 11:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB