My application has dynamically added Dropdowns. The user can add as many as they need to.
I was traditionally using jQuery\'s live()
method to detect w
In addition to the selected answer,
Port jQuery.live
to jQuery 1.9+ while you wait for your application to migrate. Add this to your JavaScript file.
// Borrowed from jQuery 1.8.3's source code
jQuery.fn.extend({
live: function( types, data, fn ) {
if( window.console && console.warn ) {
console.warn( "jQuery.live is deprecated. Use jQuery.on instead." );
}
jQuery( this.context ).on( types, this.selector, data, fn );
return this;
}
});
Note: Above function will not work from jQuery v3 as this.selector
is removed.
Or, you can use https://github.com/jquery/jquery-migrate