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);
Try just:
Instead of the 2 lines you have there, that should not produce too much recursion.