Hello Guys
In JQuery, Events trigger a JQuery function to an event handler for the selected elements in the Html page.
Currently we are using jQuery 1.7, So you should use jQuery.function.on() as below :
$(staticAncestors).on(eventName, dynamicChild, function() {
//Statement........
});
If you are using below version of JQuery 1.7 then you should use jQuery.function.live():
$(selector).live( eventName, function(){
//Statement........
} );
live() function was deprecated in JQuery 1.7 in favour of on(), and live() completely removed in 1.9. The live() signature see below :
$(selector).live( eventName, function(){
//Statement........
} );
Now, can be replaced with the following on() :
$(document).on( eventName, selector, function(){
//Statement........
} );
0 Comment(s)