$(function() { $('nav#mmenu').mmenu({ extensions : [ 'effect-slide-menu', 'pageshadow' ], counters : false, navbar : { title : '菜单', }, navbars : [ { position : 'top', content : [ 'prev', 'title', 'close' ] }, { position : 'bottom', content : [ '' ] } ] }); }); $(function(){ //$(".nav li:last").css({"background":"none","width":"95px","text-align":"right"}) //$(".scope ul li:last").css({"margin-right":"0"}) }) // $(".friendlink").click(function(){ // $(".flinkdown").toggle(200); // }) // $(".honor ul li:nth-child(4n)").css({"margin-right":"0"}); // $(".procon li:nth-child(4n)").css({"margin-right":"0"}); $(document).ready(function() { // 右侧工具栏返回顶部 $(".icon-top").click(function(){ $('body,html').animate({ scrolltop: 0 }, 500); }) if($("#menu > div").length > 4){ $('#menu').slick({ slidestoshow:4, infinite:false, }); if($("#menu .cur").length>0){ $("#menu").slick("slickgoto",$("#menu .cur").parent().data("slick-index")-3); } } else { $('#menu').slick({ slidestoshow:4, infinite:false, responsive: [ { breakpoint: 480, settings: { slidestoshow: 3, } } ] }); } }); $(function(){ if($("#menu2 > div").length > 8){ $('#menu2').slick({ slidestoshow:8, infinite:false, }); if($("#menu2 .cur2").length>0){ $("#menu2").slick("slickgoto",$("#menu2 .cur2").parent().data("slick-index")-7); } } else { $('#menu2').slick({ slidestoshow:8, infinite:false, responsive: [ { breakpoint: 992, settings: { slidestoshow: 3, } }, { breakpoint: 480, settings: { slidestoshow: 2, } } ] }); } }) //取地址栏参数 function geturlparam(key) { var url = window.location.search; var reg = new regexp("(^|&)" + key + "=([^&]*)(&|$)"); var result = url.substr(1).match(reg); return result ? decodeuricomponent(result[2]) : null; }