$("...").plugin().method(prm);
var Redirect = function() { var container = new String(); return { getContent: function(url) { }, ajaxLinks: function(elements) { $(elements).live('click', function(e) { Redirect.getContent(this.href) e.preventDefault() }); }, init: function(params) { container = params.container return this } } }(); Redirect.init({container: '#content'}).ajaxLinks('.tbl_menu a');
return this.each(function() { function go(smth){...} });
return this.each(function(smth){ // your code return; }
var carousel = $("...").Carousel(); carousel.go(2); smth = "test"; carousel.go(4);