Why am I getting too much recursion on a jQuery plugin this.each
iteration?
(function($) {
$.fn.selectableList = function(options) {
return this.each(function() {
var $this = $(this);
$this.elem = $this.children('li').click(onClick);
});
function onClick() {
//do something
}
}
})(jQuery);