[jQuery] Re: AJAX data inserted into DOM does not trigger click-event
I haven't heard of the Listen plugin before. How does it stack up against livequery? On Jun 15, 9:47 pm, Kevin Pepperman [EMAIL PROTECTED] wrote: Have you tried the listen plugin? It works with dynamicly added content. http://plugins.jquery.com/project/Listen On Sun, Jun 15, 2008 at 12:52 PM, Thasmo [EMAIL PROTECTED] wrote: Hoi guys! I define a event trigger $('#id div a).click(). The url in the href attribute of the a tag is called via $.ajax and the returned data is inserted into the #id element. So, the actual HTML in the #id event is replaced by the data AJAX response data. After the data was inserted into the #id element, the click event is not working anymore for HTML code which was inserted in the #id element. What can be the reason for this? Thanks so much for your help! -- He's spending $300 million in advertising to convince people of something he claims there is already a consensus on.-- --Think of it as going green by getting lots of green. -Glenn Beck (CNN) about Al Gore.
[jQuery] Re: AJAX data inserted into DOM does not trigger click-event
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F On Jun 16, 4:52 am, Thasmo [EMAIL PROTECTED] wrote: Hoi guys! I define a event trigger $('#id div a).click(). The url in the href attribute of the a tag is called via $.ajax and the returned data is inserted into the #id element. So, the actual HTML in the #id event is replaced by the data AJAX response data. After the data was inserted into the #id element, the click event is not working anymore for HTML code which was inserted in the #id element. What can be the reason for this? Thanks so much for your help!
[jQuery] Re: AJAX data inserted into DOM does not trigger click-event
Have you tried the listen plugin? It works with dynamicly added content. http://plugins.jquery.com/project/Listen On Sun, Jun 15, 2008 at 12:52 PM, Thasmo [EMAIL PROTECTED] wrote: Hoi guys! I define a event trigger $('#id div a).click(). The url in the href attribute of the a tag is called via $.ajax and the returned data is inserted into the #id element. So, the actual HTML in the #id event is replaced by the data AJAX response data. After the data was inserted into the #id element, the click event is not working anymore for HTML code which was inserted in the #id element. What can be the reason for this? Thanks so much for your help! -- He's spending $300 million in advertising to convince people of something he claims there is already a consensus on.-- --Think of it as going green by getting lots of green. -Glenn Beck (CNN) about Al Gore.