$('.tab_bar li').click(function(){ $(this).addClass('active').siblings().removeClass('active'); var index = $(this).index(); }) //案例欣赏 $(' #da-thumbs > li').each( function(){ $(this).hoverdir({ hoverDelay : 75 }); }); //封装函数menu高亮对应当前页面 function SetMenu(title,puptitle){ console.log(puptitle) $('.hnav li').each(function(){ var $this=$(this); if($this.find("a").text()==title) { $this.addClass('active').siblings().removeClass('active'); $this.find("a").text(puptitle); } }) } //分享 window._bd_share_config = { share : [{ "bdSize" : 16 }], } with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];