dynamic - jQuery binding live events -
I'm having trouble binding to live events in dynamically-generated content.
I have a page that is loading html page through an AJAX call. There is some JavaScript in the loaded HTML page, which is then executed. The executed JavaScript creates some elements.
I want to bind one click event handler to those elements, even after compelling them (after using .live, .delegate and plain old .click), clicking on them nothing
I am able to retrieve the contents of elements (by calling .html), but for some reason I can not force events on them ...
I have also tried to add onclick = "warning ('test');"
Thanks
John,
.livequery () Take a look at the plugin. This will provide you a full range, which will include .live () events and other callback scenarios.
jim
Comments
Post a Comment