2.使用jquery鏈操作。
(功能?($)?{
$.fn.Couplet?=?功能(選項)?{
var?正常?=?{
cou _ left:“# cou _ left”,
cou_right:'#cou_right ',
寬度:?100,//?寬度
身高:?260,//?高度
top:?260,//?書眉
邊距:?50,//?雙面邊距
min_width:1200//?最小寬度
};
var?行動組。=?$.擴展(正常,選項),?l=$(ops.cou_left),?r = $(ops . cou _ right);
l.css({'width':ops.width?+?' px ',' height':ops.height?+?' px ',' background':'#800 ',' position':'fixed ',' left':ops.margin+'px'})。動畫({top:ops.top?+?px ' });
r.css({'width':ops.width?+?' px ',' height':ops.height?+?' px ',' background':'#800 ',' position':'fixed ',' right':ops.margin+'px'})。動畫({top:ops.top?+?px ' });
if($(窗口)。width()& lt;ops.min_width){
l . hide();隱藏()
}
}
})(jQuery);