效果圖:
檔案的位置擺放:
外掛程式的**:
1 ;(functioncss**:($)32 options=$.extend(defaults,options);
33var html="";
34if(options.leftadvstr===1)
40if(options.rightadvstr===1)
47 $(".dladvleftclose,.dladvrightclose").on("click",function
());
52else
if($(this).is(".dladvrightclose"))
53 $("."+options.rightclass).fadeout(options.rightclosetime,function
());
56})
5758
59var leftadv=$("."+options.leftclass),
60 rightadv=$("."+options.rightclass),
61 dladvcloseheight=$(".dladvclosediv").eq(0).outerheight();
62 leftadv.css();
63 rightadv.css();
64function
changeimgsize(imgobj,width,height));68}
69function getadvtop(pos,type);73}
74else
if(pos==="right");76}
77}78else
if(type===1);84}
85else
if(pos==="right");88}
8990}91
else92}
93var leftadvsize=;
94var rightadvsize=;
95var leftadvpos=;
96var rightadvpos=;
97 changeimgsize($(".dladvleftimg"),options.leftwidth,options.leftheight);
98 changeimgsize($(".dladvrightimg"),options.rightwidth,options.rightheight);
99function scrollmove(num));
106},options.lefttime);
107}
108else
if(num===1),1000)
111 settimeout(function
(),1000)
113 rightadv.css();
114},options.righttime)
115116
}117
else
if(num===2));
122},options.lefttime)
123 settimeout(function
());
125},options.righttime);
126}
127});
128}
129var whomove=0;//
0,都不緩慢移動,-1,左邊緩慢移動,1表示右邊緩慢移動,2表示都移動
130if(options.lefttype===0)).css(getadvtop("left",options.lefttype)).css(leftadvsize).css(leftadvpos);
132}
133else
if(options.lefttype===1)).css(getadvtop("left",options.lefttype)).css(leftadvsize).css(leftadvpos);
135 whomove=-1;
136}
137else
140if(options.righttype===0)).css(getadvtop("right",options.righttype)).css(rightadvsize).css(rightadvpos);
142}
143else
if(options.righttype===1)).css(getadvtop("right",options.righttype)).css(rightadvsize).css(rightadvpos);
145 whomove=(whomove===0?1:2);
146}
147else
150if(whomove===0){}//
都不緩慢恢復
151else
if(whomove===-1)
154else
if(whomove===1)
157else
if(whomove===2)
160}
161});
162})(jquery);
163
1外掛程式的呼叫.dlboxleft
2.dlboxright
3.dladvleftimgbox
4.dladvclosediv
5.dladvclose
1 $(function給頁面乙個div,讓它撐出滾動條.());
3 })
1<
div
style
="height:10000px;"
>
div>
自己寫的乙個jQuery對聯廣告外掛程式
效果圖 檔案的位置擺放 外掛程式的 1 function 32 options extend defaults,options 33var html 34if options.leftadvstr 1 40if options.rightadvstr 1 47 dladvleftclose,dlad...
自己寫乙個LIST
pragma once forward declarations templateclass clistnode templateclass clist template class clistnode void insertafter t data template void clistnode ...
自己寫乙個框架
自己寫乙個框架 單入口mvc 類 庫 屬於擴充套件 乙個好的配置檔案和讀取功能 db介面 dispather.php index.php dispather 分析controller action 根據分析controller action 動態載入 引入乙個自動載入機制 controller.ph...