Uncaught TypeError: Object [object object] n'a pas de méthode "en direct"

Obtenir cette erreur:

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

De ce JavaScript et jQuery code:

init: function(options) {
  var form = this;
  if (!form.data('jqv') || form.data('jqv') == null ) {
    options = methods._saveOptions(form, options);
    //bind all formError elements to close on click
    $(".formError").live("click", function() {

      //Getting error here:
      //Uncaught TypeError: Object [object Object] has no method 'live'

    });
  }
  return this;
};

Pourquoi est-méthode live manquant?

Eh bien, .live() a été abandonné pour un temps; peut-être qu'il est vraiment allé maintenant 🙂
essayez de la modifier à $(document).on('click', '.formError', function(){ ... });
.live est allé aussi de 1,9, je pense: jsfiddle.net/6mBsB

OriginalL'auteur Francesca | 2013-04-25