$(function() { //头部轮播图 $(".Banner .flexslider").flexslider({ animation:'fade', slideshowSpeed: 6000, //展示时间间隔ms animationSpeed: 1000, //滚动时间ms touch: true //是否支持触屏滑动 }); //新闻动态 $(".list1 .flexslider").flexslider({ animation:'slides', slideshowSpeed: 5000, //展示时间间隔ms animationSpeed: 500, //滚动时间ms touch: true //是否支持触屏滑动 }); var windowWidth = $(window).width(); //所有轮播图图标 $('.flex-direction-nav').each(function(e){ $(this).find('a').each(function(){ var $this =$(this) $this.addClass('iconfont'); $this.text(''); if($this.hasClass('flex-prev')){ $(this).addClass('iconjiantouzuo') }else if($this.hasClass('flex-next')){ $(this).addClass('iconjiantouyou') } }) }) }); $(function(){ var sWSon = document.documentElement.clientWidth; var sHeight = document.documentElement.clientHeight; var bannerHeight = $('.Banner .flexslider .slides li').height(); var logHeaderHeight = $('.gp-header').height(); if (sWSon > 1200) { $(".firstScreen").mousewheel(function(event, delta, deltaX, deltaY) { if (delta < 0 && $(window).scrollTop() == 0) { $(".content ").css('top', 60); $(".content ").addClass('auto'); var resizeTimer = null; if (resizeTimer) clearTimeout(resizeTimer); resizeTimer = setTimeout(function() { $('.gp-header,.Banner,.firstScreen').addClass('currents'); }, 500); $('.gp-header').height(); // $(".Banner").height(0); } }); $(".content ").mousewheel(function(event, delta, deltaX, deltaY) { if (delta > 0 && $(".content ").scrollTop() == 0) { // $(".Banner").height(bannerHeight); $('.gp-header,.Banner,.firstScreen').removeClass('currents'); var resizeTimer = null; if (resizeTimer) clearTimeout(resizeTimer); resizeTimer = setTimeout(function() { }, 100); $(window).scrollTop(0) // $(".container2").height(sHeight - bannerHeight - logHeaderHeight).removeClass('auto') $(".content ").css('top', '100vh'); $(".content ").removeClass('auto') } }); } else { $(window).unbind('scroll'); $('.gp-header,.Banner,.firstScreen').removeClass('currents'); $(".banner").slideDown(); } $('.content ').scroll(function() { var scrollTop = $('.content ').scrollTop(); if (scrollTop > 200) { $('.rightfix ul li.li3').addClass('on') } else { $('.rightfix ul li.li3').removeClass('on') } }) $('.fix_box').click(function() { $('.content').stop().animate({ scrollTop: 0 }); return false; }); })