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

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -