| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- $(function(){
- $(".zhzdFir").click(function () {
- $(this).toggleClass("now").siblings(".zhzdMenu").slideToggle("fast")
- });
- })
- $(window).bind("scroll",function() {
- if ($(document).scrollTop() + $(window).height(768)) {
- $('.weiheList').addClass('show');
- }
- })
- $(function(){
- $('.caseList .caseListBox').width(990*$('.caseList li').length+'px');
- $(".caseContainer .tab a").mouseover(function(){
- $(this).addClass('on').siblings().removeClass('on');
- var index = $(this).index();
- number = index;
- var distance = -990*index;
- $('.caseContainer .caseListBox').stop().animate({
- left:distance
- });
- });
-
- var auto = 1; //等于1则自动切换,其他任意数字则不自动切换
- if(auto ==1){
- var number = 0;
- var maxNumber = $('.caseContainer .tab a').length;
- function autotab(){
- number++;
- number == maxNumber? number = 0 : number;
- $('.caseContainer .tab a:eq('+number+')').addClass('on').siblings().removeClass('on');
- var distance = -990*number;
- $('.caseContainer .caseListBox').stop().animate({
- left:distance
- });
- }
- var tabChange = setInterval(autotab,3000);
- //鼠标悬停暂停切换
- $('.caseContainer').mouseover(function(){
- clearInterval(tabChange);
- });
- $('.caseContainer').mouseout(function(){
- tabChange = setInterval(autotab,3000);
- });
- }
- });
|