$(window).scroll(function () { var scrollPos = $(window).scrollTop(); if (scrollPos > 0) { $("body").addClass("scrolling"); } else { $("body").removeClass("scrolling"); } if (scrollPos > 500) { $(".totop").fadeIn(); } else { $(".totop").fadeOut(); } }); $(function () { $("body").on("click", ".sertypes dt", function () { $(this).next("dd").stop(false, true).slideToggle(); }) $(document).click(function (event) { var con = $('.sertypes dt'); if (!con.is(event.target) && con.has(event.target).length === 0) { $('.sertypes dd').slideUp(); } }); $(".topSearch form").addClass('s_title'); $(".sertypes dd ul li").click(function(){ var val = $(this).data('val'); var txt = $(this).text(); $(this).parent().parent().prev('dt').find('span').text(txt); $("#serType").val(val); $(".topSearch form").removeClass().addClass('s_'+val) }) $("#app").append('
') var scrollPos = $(window).scrollTop(); if (scrollPos > 0) { $("body").addClass("scrolling"); } else { $("body").removeClass("scrolling"); }; $(".showSear").click(function () { $(".ser-layer").addClass('showdiv'); //$('body').removeClass('navShow'); }) $(".serclose").click(function () { $(".ser-layer").removeClass('showdiv'); }); $(".totop").click(function () { $('body,html').animate({ scrollTop: 0 }, 500); return false; }); $(".topnav ul li i.plus").click(function () { $(this).toggleClass('show').next().slideToggle(); $(this).parent().siblings('li').find('.plus').removeClass('show').next().slideUp() }) $(".left_menus").click(function(e){ $(this).next('.nyleftNav').slideToggle(); $(this).toggleClass('on'); $(document).one("click", function(){ $(".nyleftNav").slideUp(); $(".left_menus").removeClass('on') }); e.stopPropagation(); }) $('.navbtnm').click(function () { $('body').toggleClass('navShow'); $('.header .hda .wp').slideToggle(); }); $('.navbtn').click(function () { $('body').toggleClass('navShow'); }) $(".tabNav").each(function () { $(this).find('.mores a:eq(0)').show(); $(this).find('ul li:eq(0)').addClass('on'); }); $(".suTab").each(function () { var Navs = $(this).find('.mores .more'); var Lis = $(this).find('.hd ul li'); Navs.eq(0).show(); Lis.click(function () { var index = $(this).index(); Navs.eq(index).show().siblings().hide(); }) }); $(".swiTab").each(function () { var Navs = $(this).find('.mores .more'); var Lis = $(this).find('.tabNav ul li'); Navs.eq(0).show(); Lis.click(function () { var index = $(this).index(); Navs.eq(index).show().siblings().hide(); }) }); if (!isIE || ieVer == 10 || isIE11) { $('.suTab').slide({ trigger: 'click' }); } })