$(function () { if ($(window).width() < 1004) { $('.newShow .content').find('img').css('width', '100%'); $('.newShow .content').find('img').css('height', 'auto'); } //-- $('.sNavA').each(function(i){ $(this).hover( function(){ $('.sNav').eq(i).css('left',$(this).offset().left-43); $('.sNavA').eq(i).addClass('liNow1'); $('.sNav').eq(i).slideToggle(300); }, function(){ $('.sNavA').eq(i).removeClass('liNow1'); $('.sNav').hide(); } ) $('.sNav').eq(i).hover( function(){ $('.sNavA').eq(i).addClass('liNow1'); $(this).show(); }, function(){ $('.sNavA').eq(i).removeClass('liNow1'); $(this).hide(); } ) }) //-- $('.tabContentDiv').find('.tabContent:first').show(); $('.tab').each(function(i){ $(this).find('li').each(function(ii){ $(this).hover( function(){ $('.tab').eq(i).find('li').removeClass('liNow'); $(this).addClass('liNow'); $('.tabContentDiv').eq(i).find('.tabContent').hide(); $('.tabContentDiv').eq(i).find('.tabContent').eq(ii).show(); }, function(){} ) }) }) //-- $('.tabContentDiv2').find('.tabContent2:first').show(); $('.tab2').each(function(i){ $(this).find('li').each(function(ii){ $(this).click( function(){ $('.tab2').eq(i).find('li').removeClass('liNow'); $(this).addClass('liNow'); $('.tabContentDiv2').eq(i).find('.tabContent2').hide(); $('.tabContentDiv2').eq(i).find('.tabContent2').eq(ii).show(); } ) }) }) //-- $('.tabContentDiv3').find('.tabContent3:first').show(); $('.tab3').each(function(i){ $(this).find('dd').each(function(ii){ $(this).hover( function(){ $('.tab3').eq(i).find('dd').removeClass('ddNow'); $(this).addClass('ddNow'); $('.tabContentDiv3').eq(i).find('.tabContent3').hide(); $('.tabContentDiv3').eq(i).find('.tabContent3').eq(ii).show(); }, function(){} ) }) }) //-- $('.listHover').find('li').hover( function(){ $(this).addClass('on'); }, function(){ $(this).removeClass('on'); } ) //-- $('.topA').click(function(){ $('body,html').animate({scrollTop: 0}, 500); }) //-- $('.sideTitleTel').find('.tan').toggle( function(){ $('.sideTitleNav').show(); $('.sideTitleTel').find('.con').addClass('on'); }, function(){ $('.sideTitleNav').hide(); $('.sideTitleTel').find('.con').removeClass('on'); } ) //-- $('.footDiv').find('.links').hover( function(){ $(this).find('dl').stop(true,true).slideDown(300); }, function(){ $(this).find('dl').stop(true,true).slideUp(300); } ) //-- $('.footDivTel').find('.links').hover( function(){ $(this).find('dl').stop(true,true).slideDown(300); }, function(){ $(this).find('dl').stop(true,true).slideUp(300); } ) //-- $('.navIco').click(function(){ $('.navLayer').animate({right: "0",width:"100%"}, 500); $('.pageBg').fadeIn(500); }) $('.navLayer').find('.closeBtn').click(function(){ $('.navLayer').animate({right: "-100%",width:0}, 500); $('.navLayer').find('a').removeClass('aNow'); $('.navLayer').find('.list').hide(); $('.pageBg').fadeOut(500); }) //-- $(".subNav1").click(function(){ $(this).toggleClass("currentDt").siblings(".subNav1").removeClass("currentDt") $(this).next(".navContent").slideToggle(300).siblings(".navContent").slideUp(500) }) //-- $('.sideBar').find('li').hover( function(){ $(this).addClass('liNow'); }, function(){ $(this).removeClass('liNow'); } ) if ($(window).width() >= 1004) { $('.indexPart1').find('li').hover( function () { $(this).find('.hideBox').height($(this).find('.box').height()); $(this).find('.hideBox').fadeIn(200); }, function () { $(this).find('.hideBox').fadeOut(200); } ) } //-- $('.banner').find('.scrollBtn').click(function(){ $("html, body").animate({ scrollTop: $('.indexPart1').offset().top + "px" }, { duration: 1000, easing: "easeInOutExpo" }); }) //-- $(".development").find('.list').find('li:odd').find('.hideBox').css('background','#efefef'); $('.development').find('.list').find('li').hover( function(){ $(this).find('.hideBox').fadeIn(200); $(this).find('.hideBox').height($(this).height()); }, function(){ $(this).find('.hideBox').fadeOut(200); } ) //-- if($(window).width()>=1004){ $('.application').find('li').hover( function(){ $(this).find('.hideBox').fadeIn(200); $(this).find('.hideBox').height($(this).find('.box').height()); }, function(){ $(this).find('.hideBox').fadeOut(200); } ) } //-- if($(window).width()>=1004){ $(".industryShow .list li").hover(function(){ $(this).find('em').stop(true).animate({marginLeft:"-50px",},300); $(this).find('img').fadeIn(200); },function(){ $(this).find('em').stop(true).animate({marginLeft:"0px"},300); $(this).find('img').fadeOut(200); }) } //-- $('.leftSearch').find('.list').find('li').click(function(){ $('.leftSearch').find('.list').find('li').removeClass('liNow'); $(this).addClass('liNow'); }) //-- if($(window).width()>=1004){ $(".fair .list li").hover(function(){ $(this).find('.time').stop(true).animate({right:"125px",},400); $(this).find('.more').fadeIn(200); },function(){ $(this).find('.time').stop(true).animate({right:"40px"},400); $(this).find('.more').fadeOut(200); }) } //-- $('.job').find('li').find('.top').each(function(i){ $(this).find('.btn1').click(function(){ if($(this).hasClass('liNow')){ $('.job').find('li').find('.btn1').removeClass('liNow'); $('.job').find('li').removeClass('liNow'); $('.job').find('.box').slideUp(500); }else{ $('.job').find('li').find('.btn1').removeClass('liNow'); $('.job').find('li').removeClass('liNow'); $('.job').find('.box').slideUp(500); $(this).addClass('liNow'); $('.job').find('li').eq(i).addClass('liNow'); $('.job').find('.box').eq(i).slideToggle(500); } }) }) //-- $('.contact').find('.map').find('li').each(function(i){ $(this).hover( function(){ $('.contact').find('.map').find('li').eq(i).addClass('on'); }, function(){ $('.contact').find('.map').find('li').eq(i).removeClass('on'); } ) }) //-- //$('.indexPart2').find('.list').each(function(i){ // $(this).find('li').hover( // function(){ // $('.indexPart2').find('.list').eq(i).find('li').removeClass('liNow'); // $(this).addClass('liNow'); // $('.indexPart2').find('.list').find('li').removeClass('liNow2'); // $(this).find('.bottom').show(); // $(this).siblings().find('.bottom').hide(); // }, // function(){ // } // ) //}) $('.indexPart2').find('.list').each(function (i) { $(this).find('li').hover( function () { $('.indexPart2').find('.list').eq(i).find('li').removeClass('liNow'); $(this).addClass('liNow'); $(this).fadeTo(200, 0.8); $('.indexPart2').find('.list').find('li').removeClass('liNow2'); // $(this).find('.bottom').animate({bottom: "0px",width:"100%"}, 500); // $(this).siblings().find('.bottom').animate({bottom: "-74px",width:"100%"}, 500); $(this).find('.bottom').show(); $(this).siblings().find('.bottom').hide(); }, function () { $(this).fadeTo(200, 1); } ) }) //-- $('.historyContentDiv').find('.historyContent:first').show(); $('.historyList').each(function (i) { $(this).find('.slick-slide').each(function (ii) { $(this).click( function () { $('.historyList').eq(i).find('.slick-slide').removeClass('slickon'); $(this).addClass('slickon'); $('.historyContentDiv').eq(i).find('.historyContent').hide(); $('.historyContentDiv').eq(i).find('.historyContent').eq(ii).show(); } ) }) }) $('.about').find('.list').find('li').find('.a1').each(function (i) { $(this).click(function () { prompt_fun('.wenziLayer'); }) }) //下拉通用 $('.select').each(function(i){ function showFn(selectObj) { //展开效果 // 把其他的下拉收起 $('.select').children("dd").slideUp(200); selectObj.children("dd").slideDown(200); selectObj.addClass('on'); } function hideFn(selectObj){ //关闭效果 selectObj.children("dd").slideUp(200); selectObj.removeClass('on'); } function hideAll(){ $('.select dd').slideUp(200); }; $(this).children('dt').click(function(){ var index = $(this).parent().index(); var selectObj = $(this).parent(); $(this).next().is(":hidden")?showFn(selectObj):hideFn(selectObj); }); $(this).children('dd').find("li").click(function(){ var index = $(this).closest('.select').index(); var dataId=$(this).attr('data-id'); var selectObj = $(this).closest('.select'); $(this).closest('.select').children("dt").find('a').html($(this).html()); $(this).closest('.select').children("dt").find('a').attr('data-id',dataId); hideFn(selectObj); }); $("body").click(function(i){ !$(i.target).parents(".select").first().is($(".select")) ? hideAll():""; }); }); }) jQuery(document).ready(function($){ // browser window scroll (in pixels) after which the "back to top" link is shown var offset = 300, //browser window scroll (in pixels) after which the "back to top" link opacity is reduced offset_opacity = 1200, //duration of the top scrolling animation (in ms) scroll_top_duration = 700, //grab the "back to top" link $back_to_top = $('.cd-top'); //hide or show the "back to top" link $(window).scroll(function(){ ( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out'); if( $(this).scrollTop() > offset_opacity ) { $back_to_top.addClass('cd-fade-out'); } }); //smooth scroll to top $back_to_top.on('click', function(event){ event.preventDefault(); $('body,html').animate({ scrollTop: 0 , }, scroll_top_duration ); }); }); function search() { var keys = document.getElementById("txtk").value; location.href = "/NewsCenter/search.aspx?a=n&keys=" + keys; } function entersearch() { //alert(dd); var keys = document.getElementById("txtk").value; var event = window.event || arguments.callee.caller.arguments[0]; if (event.keyCode == 13) { //search(); window.location.href = "/NewsCenter/search.aspx?a=n&keys=" + keys; return false; } }