(function($,window){ jQuery.fn.treetable=function(options){ var $owner=this, settings={head:'',data:'',url:'',collapse:true}; //todo:... } })(jQuery,window);