jquery - Uncaught TypeError: Object [object Object] has no method 'live' -


getting error:

uncaught typeerror: object [object object] has no method 'live' 

from javascript , jquery code:

init: function(options) {   var form = this;   if (!form.data('jqv') || form.data('jqv') == null ) {     options = methods._saveoptions(form, options);     // bind formerror elements close on click     $(".formerror").live("click", function() {        //getting error here:       //uncaught typeerror: object [object object] has no method 'live'      });   }   return this; }; 

why method live missing?

.live removed in jquery 1.9

see docs: http://api.jquery.com/live/


try using .on instead:

$(document).on('click', '.formerror', function(){     //your event function }); 

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -