123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- function autoFlashHeight(){
- $(".sideBar").height($(window).height());
- $(".contentItem").height($(window).height());
- $(".contentItem").width($(window).width()-150);
- $(".cover").width($(window).width());
- $(".cover").height($(window).height());
- };
- $(function(){
- // $(".mainTab li").click(function(){
- // $(this).addClass("now").siblings().removeClass("now");
- // $(".warpContent > .contentItem ").hide().eq($(".mainTab li").index(this)).animate({opacity: 'toggle'},500);});
- // $(function(){
- // tabs($(".mainTab li"), $('.contentItem'));
- // })
- // var tabs = function(mainTab , contentItem){
- // mainTab.click(function(){
- // var indx = mainTab.index(this);
- // mainTab.removeClass('now');
- // $(this).addClass('now');
- // contentItem.hide();
- // contentItem.eq(indx).show();
- // })
- // }
- var q=1;
- var show_li = $("#pointer1 li");
- show_li.each(function(index){
- $(this).click(function(){
- $(this).addClass("now").siblings().removeClass("now");
- $("#slideBanner1 .bannerEntry").fadeOut("fast").eq($(".pointer1 li").index(this)).fadeIn("fast");
- q=index+1;
- });
- });
-
- /*--------------------------------------------------------*/
- var auto_show = true;
- $("#pointer1,.learnMore").hover(function(){
- auto_show = false;
- },function(){
- auto_show = true;
- });
- /*自动轮换*/
-
- var max_num=2;//最大数减一
- setInterval(function(){
-
- if(auto_show){
- if(q>1){
- q=0;
- }
- $("#slideBanner1 .bannerEntry").fadeOut("fast").eq(q).fadeIn("fast");
- show_li.removeClass("now")
- show_li.eq(q).addClass("now");
- }
- q++;
- },5000);//end setInterval
- });
|