Recently, for project reasons, I learned jquery and implemented a small function, that is, click the previous one of the announcements to view the scroll bar. The Code is as follows:
Copy codeThe Code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = GBK"/>
<Meta http-equiv = "X-UA-Compatible" content = "IE = 7"/>
<Meta name = "keywords" content = ""> <meta name = "description" content = "">
<Title> test </title>
<Script type = "text/javascript" src = "jquery-1.2.6.pack.js"> </script>
<Style>
. Banner_index {float: left; width: 730px; height: 239px; overflow: hidden; margin: 5px 0 0 0 ;}
. Banner_index_pic {width: 730px; height: 239px; overflow: hidden ;}
</Style>
</Head>
<Body scroll = "yes">
<Script type = "text/javascript" src = "jcarousellite_1.0.1.js"> </script>
<Div class = "gg">
<Li class = "gg_btn">
</Li>
<Li class = "gg_info">
<A class = "aa" style = "cursor: hand" href = "/notice/">
<B> announcement of the Office: </B> </a>
<Div id = "dt_gg" style = "display: none; float: left; width: pixel;">
<Ul style = "height: 25px; overflow: hidden;">
<Li style = "width: 300px">
<A class = "aa" href = "/cms/web/default/new/notice/50514.shtml" title = "notice on adjusting the standard of the upper limit of the call fee for the local telephone network in the province ">
<Span style = "width: 300px;"> about adjusting the local telephone network of the province </span>
</A>
<Span style = "width: 100px;"> [2010-06-24] </span>
</Li>
<Li style = "width: 300px">
<A class = "aa" href = "/cms/web/default/new/notice/50515.shtml" title = "China Telecom Airport/station VIP service electronic certification announcement">
<Span style = "width: 300px;"> China Telecom Airport/station VIP service electronics </span>
</A>
<Span style = "width: 100px;"> [2010-06-24] </span>
</Li>
</Ul>
</Div>
</Li>
</Div>
<Script type = "text/javascript">
JQuery (function (){
Jquery('{dt_gg'}.css ("display", "block ");
If (jQuery ('# dt_gg'). find ('lil'). length> 1 ){
JQuery ('# dt_gg'). jCarouselLite ({
BtnPrev: '# gg_n ',
BtnNext: '# gg_p ',
BtnAutoSwitch: '# gg_s ',
Visible: 1,
Auto: 5000,
Velocity: 1000,
OnMouse: true,
Vertical: true
});
} Else {
JQuery ('# dt_gg'). jCarouselLite ({
Visible: 1
});
}
});
JQuery (function (){
JQuery ('# gg_s'). click (function (){
If (jQuery (this). attr ('src') = "/cms/web/images/V3/public/break_btn.jpg "){
JQuery (this). attr ('src', '/cms/web/images/V3/public/play_btn.jpg ');
JQuery (this). attr ('title', 'player ');
} Else {
JQuery (this). attr ('src', '/cms/web/images/V3/public/break_btn.jpg ');
JQuery (this). attr ('title', 'stopped ');
}
});
});
</Script>