$.fn.formreg=function(options){
options = $.extend({}, $.fn.formreg.defaults, options);
return this.each(function() {
var $this = $(this) ;
});
};
$.fn.formreg.defaults={
stepWidths:0,
sliding_time:200,
step_opacity:0.8,
'step_id':'steps',
nav_id:'navigation'
}
这就是我使用插件和传递选项值的方式。
$('#formElem').formreg({
sliding_time:900, //sliding time
step_opacity:0.2, // FieldSet alpha effect when sliding , 1 means 100%
step_id:'steps2', // Id of the sliding main container ..
nav_id:'navigation2', // Id of navigation bottom buttons..
});
问题是无论发送什么值,值都不会改变