I saw on the jquery documentation that live() is deprecated. Is there a direct replacement function?
$(document).on('event', 'selector', function() {});
replaces .live()
.
$('selector').on('event', 'selector', function() {});
replaces .delegate()
.
$('selector').on('event', function() {});
replaces .bind()
.
Of course:
http://api.jquery.com/on/
http://api.jquery.com/off/
The page for live()
shows how to convert to on()
:
http://api.jquery.com/live/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With