//鍥炲埌椤堕儴 $(function() { $(".tnproduct").hover(function(){ $(".secnav").show(); },function(){ $(".secnav").hide(); }); $(".secnav li a").hover(function(){ $(this).parent().parent().show(); },function(){ $(this).parent().parent().hide(); }); $(".secnav").hover(function(){ $(this).show(); },function(){ $(this).hide(); }); $(".tnvn").hover(function(){ $(this).parent().find('.subnavn').show(); },function(){ $(this).parent().find('.subnavn').hide(); }); // $(".secnavn a").hover(function(){ // $(this).parent().show(); // },function(){ // $(this).parent().hide(); // }); $(".subnavn").hover(function(){ $(this).show(); },function(){ $(this).hide(); }); $(window).on("scroll",function(){ // if($(window).scrollTop()>100){ // $("#theader").addClass("header_w"); // }else{ // $("#theader").removeClass("header_w"); // } }); $(".fnavs dl dt").bind("click",function(){ if($('html').hasClass('screen-phone')){ if($(this).parent().children('dd').is(':hidden')){ $(this).parent().children('dd').show(); }else{ $(this).parent().children('dd').hide(); } } }); $("#backtotop").totop(); // //鏁版嵁鎻愪氦 $('.tform').click(function(){ var phone =$('#uphone').val(); var reg = /^1{1}[34578]{1}\d{9}$/; if(!reg.test(phone)){ $('#uphone').val(''); $('#uphone').focus(); return false; } $.post("/index.php?m=formguide&c=index&a=show&formid=14&siteid=1",$("#tyuyue").serialize(), function(data){ if(data >0 ){ alert('鎻愪氦鎴愬姛锛岃淇濇寔鐢佃瘽鐣呴€氾紒'); }else{ alert('璇锋眰澶辫触锛?); } } ); }); }); function alert(msg){ $('#alertmsg').html(msg); $('#mySmModal').modal({ keyboard : false, show : true }); } (function($) { $.fn.totop = function(opt) { var scrolling = false; return this.each(function() { var $this = $(this); $(window).scroll(function() { if (!scrolling) { var sd = $(window).scrollTop(); if (sd > 100) { $this.fadeIn(); } else { $this.fadeOut(); } } }); $this.click(function() { scrolling = true; $('html, body').animate({ scrollTop: 0 }, 500, function() { scrolling = false; $this.fadeOut(); }); }); }); }; })(jQuery); //鎵嬫満绔 灞曞紑鑿滃崟 function showmenu(){ if($('.tnav').hasClass('subMenu')){ $('.tnav').removeClass('subMenu'); $(".tnvn").hover(function(){ $(this).parent().find('.subnavn').show(); },function(){ $(this).parent().find('.subnavn').hide(); }); $('.mabout').attr('href','/about'); $('.msupports').attr('href','/supports'); $('.mc62').attr('href','/c62'); $('.msolutions').attr('href','/solutions'); $('.mc35').attr('href','/c35'); $("body").css("position","relative"); $(".tnproduct").parent().find("#tnproduct").remove(); $("#tnproduct").addClass('container-fixed'); }else{ $('.tnav').addClass('subMenu'); $('.tnav li a.hasmenu').attr('href','javascript:void(0)'); $('.tnav li a.hasmenu').unbind(); $(".tnvn").bind("click",function(){ if($(this).parent().find('.subnavn').is(':hidden')){ $(this).parent().find('.subnavn').show(); }else{ $(this).parent().find('.subnavn').hide(); } }); $("body").css("position","fixed"); $(".tnproduct").bind("click",function(){ if($(".tnproduct").parent().children("#tnproduct").hasClass('pppmenu')){ $(".tnproduct").parent().find("#tnproduct").remove(); }else{ $(this).parent().append($('.secnav').html()); } }); $("#tnproduct").removeClass('container-fixed'); //$('.tnav li a.hasmenu').append(''); } }