$(function () { index(); tabdiv(); menu(); applycon(); popup() }) function index(){ $(".indexbanner").slide({maincell:".bigimg ul",titcell:".smallimg ul li",autoplay:true,delaytime:1000,titonclassname:"active"}); $(".sidernew").slide({maincell:"ul",autoplay:true,effect:"leftmarquee",intertime:50,pnloop:false}); $('.colorc').kxbdsupermarquee({ distance:282, time:3, btngo:{left:'.prev',right:'.next'}, direction:'left', isauto:false }); $('.nocolorl').kxbdsupermarquee({ distance:262, time:1, btngo:{left:'.prev',right:'.next'}, direction:'left', isauto:false }); $('.nocolorr').kxbdsupermarquee({ distance:262, time:1, btngo:{left:'.prev',right:'.next'}, direction:'left', isauto:false }); $('.idnexcont .video a').click(function(){ var height=$('body').height()-$('.header').height()-$('.indexbanner').height()-$('.footer').height(); $('.video-popup').height(height); $('.video-popup').show(600); }) $('.video-close').click(function(){ $('.video-popup').hide(600); }) } function tabdiv(){ //10-31 修改 邢斐---------新增:trigger:"click" $(".tabdiv").slide({maincell:".tabbox",titcell:".tabicon a",titonclassname:"active",trigger:"click"}); //---------------------------- $(".tabbox div").slide({titcell:"h3", targetcell:".showdiv",defaultindex:0,effect:"slidedown",delaytime:300,trigger:"click",returndefault:false,titonclassname:"h3hover"}); $(".mapadd .add").slide({titcell:"h3", targetcell:".info",defaultindex:0,effect:"show",delaytime:300,returndefault:false,titonclassname:"h3none"}); $(".mapadd .map ").slide({maincell:".add",titcell:"li",titonclassname:"active",effect:"show",titonclassname:"now",defaultindex:false}); $('.sidenav li a').click(function(e){ var dropdown = $(this).next(); $('.sidenav li ol').not(dropdown).slideup(100); $(this).parent().toggleclass('lidownhover'); dropdown.slidetoggle(100); }) $(".sidenav ol li a.active").parent().parent().css("display","block") } function menu(){ $(".nav").slide({ type:"menu", titcell:".menu", targetcell:"div",effect:"slidedown",delaytime:300,triggertime:0,returndefault:true}); } //////////////////////////////// $(function(){ $(".select span").click(function(){ $(this).next(".list").slidetoggle(); $(".list").each(function(){ var temp = $(".list li").text(); $(".list li").click(function(){ temp = $(this).text(); $(".select").find("span").text(temp); $(".list").hide(); }); }); }); //点击其他地方下拉框消失 $(".select span,.list").click(function(event){ if(event.stoppropagation) // this code is for mozilla and opera event.stoppropagation(); else if(window.event) // this code is for ie window.event.cancelbubble = true; }) $(document).click(function(event) { $(".list").hide(); }); $(".fix_r_connct").hover(function(){ $(this).addclass("border-left-none") $(".customer-service").show(); }, function(){ $(this).removeclass("border-left-none") $(".customer-service").hide(); }); }) function applycon(){ $('.apply-con div a').click(function(){ $(this).next('ul').slidedown(); }) $('.apply-con ul li').click(function(){ $(this).parent('ul').slideup(); $(this).parent('ul').prev('a').text($(this).text()) }) } function popup(){ $('.tabicon .ask').click(function(){ var height=$('body').height()-$('.header').height()-$('.footer').height(); $('.que-popup-bg').height(height); $('.que-popup-bg').show(); $('.que-popup').show(); }) $('.que-popup .close,.que-popup .submit').click(function(){ $('.que-popup-bg').hide(); $('.que-popup').hide(); }) /*$('.submit-que').click(function(){ var height=$('body').height()-$('.header').height()-$('.footer').height(); $('.popup-bg').height(height); $('.popup-bg').show(); $('.thanks').show(); }) $('.thanks .close').click(function(){ $('.popup-bg').hide(); $('.thanks').hide(); })*/ } //2015-01-19 工程案例 $(function(){ $('.y_case ul').each(function(){ var num =$(this).children('li').length; $(this).find('li:gt(7)').hide(); if( num >8){ $(this).siblings('a').show(); }else{ $(this).siblings('a').hide(); } }); $('.y_case-more').click(function(){ if($(this).text()=='查看更多>'){ $(this).siblings('ul').children('li:gt(7)').show(); $(this).text('收起'); }else{ $(this).siblings('ul').children('li:gt(7)').hide(); $(this).text('查看更多>'); } }); }) //2015-01-19 顶部二维码 $(function(){ $('.share .wx').click(function(){ $(this).parent('div').next('.ewmwem').slidetoggle(); }); $(document).click(function(event) { $('.ewmwem').slideup(); }); $(".share .wx").click(function(event){ if(event.stoppropagation) // this code is for mozilla and opera event.stoppropagation(); else if(window.event) // this code is for ie window.event.cancelbubble = true; }) })