Pourquoi est-ce que je reçois trop de récursion sur un plugin jQuery this.each
itération?Plugin JQuery Trop de récursion sur this.each
(function($) {
$.fn.selectableList = function(options) {
return this.each(function() {
var $this = $(this);
$this.elem = $this.children('li').click(onClick);
});
function onClick() {
//do something
}
}
})(jQuery);
Version JQuery 1.3.2 BTW – Sam3k
définir « trop récursion » Hey – Matt
Sam3k Je ne sais pas ce que vous entendez par trop récursivité. Ce code fonctionne bien pour moi. – Jieren