我的插件是:
$.fn.iPopup = function() {
var opts = new function() {
this.width = 957;
this.height = 590;
this.left = ($(document).width() / 2) - (this.width/2) - (17/2);
this.top = 160;
}
alert (opts.width);
}
我想在调用 plugin 时更改宽度或高度,例如:
$('div#tP').iPopup({width:280});
我应该在我的插件中做什么?