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

[eluser]Kamarg[/eluser]
If I'm reading this correctly, you're actually replacing your nextweeklink element when you do the .load and fill in a bunch of new html including a new nextweeklink. Since the click event was bound to the now removed link, your new links have no javascript action associated to them. You either need to bind the click event to the new nextweeklink element after the .load or rework it so you don't replace the original.

Edit: Just read the livequery plugin description. Seems like it should be taking care of this for you and so you can ignore my post.

2nd Edit: From further in the livequery documentation.
Quote:When an element no longer matches a selector the events Live Query bound to it are unbound. The Live Query can be expired which will no longer bind anymore events and unbind all the events it previously bound.

It looks like it's saying that if at any time there aren't any nextweeklink items, it will unbind the event completely. So possibly this is still your problem.


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