Код: Выделить всё
var defaults = { method: 'bind' /* or live */ };
var options = $.extend(defaults, options);
Код: Выделить всё
$(selector).**method**('click', function(event) { /* code */});
Код: Выделить всё
if(options.method == 'live') { $(selector).live('click', function(event) { /* code */}); } else { $(selector).bind('click', function(event) { /* code */});}
Подробнее здесь: https://stackoverflow.com/questions/590 ... lugin-help
Мобильная версия