i am trying to run a live click function in jQuery and found that's not work like
$(function () {
$("#elem #check").click(function () {
alert('goaa');
});
$("#elem #check").live("click", function () {
alert('fo');
});
});
the page load and nothing come from ajax.when i trying to run that i found that [click] first is work and second not [live click].
what is the reason of click are work and live not worked.:-
Well it is my fault that i am trying to run it on jQuery UI tab so that's not worked.
No idea what the problem is. As you can see in the following live demonstration this code works perfectly fine.
Earlier, live function works perfectly in a dynamic loaded content. But it is not working on recent JQuery file. But you can use another function: https://api.jquery.com/delegate/
probably somewhere for your selector or on parent elements click event stopped for ex
$("#elem")
or on parentin oter place stopped event bubbling and capture