Skip to content Skip to sidebar Skip to footer

Why I'm Getting The Jquery Error "typeerror: $(...).live Is Not A Function " In Following Scenario?

Actually I'm trying to implement the autocomplete functionality to one text field but getting the above error, couldn't understand why I'm getting this error. Can you help me in re

Solution 1:

live() has been removed since version 1.9 and was deprecated since 1.7:

You'll be wanting on() now days

$('#friends').on("click", ".remove", document.getElementById("friends"), function(){  

where #friends is available on DOM ready. You can't bind on() on a dynamical loaded element.

Solution 2:

You can use the .on() instead of .live() (deprecated after Jquery 1.7)

$(document).on('event', 'selector', function() {}); replaces .live().

Eg:

$( document ).on( "click", "#elementId ", function(){  alert( "Do here what you want!" );  // jQuery1.7+    });

Solution 3:

Live() has been removed since 1.9 from jquery. Please use on

Post a Comment for "Why I'm Getting The Jquery Error "typeerror: $(...).live Is Not A Function " In Following Scenario?"