Server : nginx/1.22.1 System : Linux iZwz9daxib3w3i063fw434Z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 User : www ( 1000) PHP Version : 7.2.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/www.jkmold.com/statics/xingjingke/js/ |
$(function() { // 商品悬浮高亮 $('#content .ulWrap>ul>li').hover(function(){ $(this).css('border','1px solid #f7711c'); },function(){ $(this).css('border','1px solid #d7d7d7'); }); // 滚动条高度大于800清除侧边栏 $(window).scroll(function (){ var st = $(this).scrollTop(); // console.log(st); if (parseInt(st) < 800) { $('.cTab').css('display','none'); }else{ $('.cTab').css('display','block'); }; }); //分页轮播pre,nexta按钮变色 $('.picScroll-left .prev, .picScroll-left .next').hover(function(){ $(this).addClass('pNon'); },function(){ $(this).removeClass('pNon'); }); // 锚点平滑跳转 // $("#div").animate({scrollTop:$("#div").offset().top}, 500); // 点击清除旋转动画 $('.cTab>li>a').click(function(){ $(this).siblings('div').parent().removeClass('current2'); }); // 分页数为1时不显示 $(function(){ var liLenth1 = $('#apple .hd ul li').length; var liLenth2 = $('#asus .hd ul li').length; var liLenth3 = $('#think .hd ul li').length; var liLenth4 = $('#lenvo .hd ul li').length; var liLenth5 = $('#acer .hd ul li').length; var liLenth6 = $('#dell .hd ul li').length; if(parseInt(liLenth1) == 1){ $('#apple .hd ul li').parent().parent().parent().css('display','none'); } if(parseInt(liLenth2) == 1){ $('#asus .hd ul li').parent().parent().parent().css('display','none'); } if(parseInt(liLenth3) == 1){ $('#think .hd ul li').parent().parent().parent().css('display','none'); } if(parseInt(liLenth4) == 1){ $('#lenvo .hd ul li').parent().parent().parent().css('display','none'); } if(parseInt(liLenth5) == 1){ $('#acer .hd ul li').parent().parent().parent().css('display','none'); } if(parseInt(liLenth6) == 1){ $('#dell .hd ul li').parent().parent().parent().css('display','none'); } }); // // 调用superslide jQuery(".picScroll-left").slide({titCell:".hd ul",mainCell:".bd .ulWrap",autoPage:true,effect:"leftLoop",autoPlay:false,vis:1}); //标签页鼠标悬浮 $('.cTab li').hover(function(){ $(this).addClass('current current2'); },function(){ $('.cTab li').removeClass('current current2'); }); //标签页切换 // $('.cTab li').click(function(){ // $(this).addClass('current').siblings().removeClass('current'); // $('#content .cShow').eq($(this).index()).show().siblings().hide(); // }); // 幻灯片 var sWidth = $("#focus").width(); var len = $("#focus ul li").length; var index = 0; var picTimer; var btn = "<div class='btn'>"; for(var i=0; i < len; i++) { btn += "<span></span>"; } btn += "</div><div class='preNext pre'></div><div class='preNext next'></div>"; $("#focus").append(btn); $("#focus .btn span").css("background-color","#989898").mouseover(function() { index = $("#focus .btn span").index(this); showPics(index); }).eq(0).trigger("mouseover"); $("#focus .preNext").css("opacity",0.4).hover(function() { $(this).stop(true,false).animate({"opacity":"1"},300); },function() { $(this).stop(true,false).animate({"opacity":"0.4"},300); }); $("#focus .pre").click(function() { index -= 1; if(index == -1) {index = len - 1;} showPics(index); }); $("#focus .next").click(function() { index += 1; if(index == len) {index = 0;} showPics(index); }); $("#focus ul").css("width",sWidth * (len)); $("#focus").hover(function() { clearInterval(picTimer); },function() { picTimer = setInterval(function() { showPics(index); index++; if(index == len) {index = 0;} },1000); }).trigger("mouseleave"); function showPics(index) { var nowLeft = -index*sWidth; $("#focus ul").stop(true,false).animate({"left":nowLeft},300); $("#focus .btn span").stop(true,false).css("background","#989898").eq(index).stop(true,false).css("background","#ed6b02"); } });