左侧高亮(js)
//左导航高亮
(function(){
var leftnav = $('#leftnav'); //左侧ul
var pi = __preset.curpathid;
if(pi=='/account') pi += '/index';
if(pi.match(/(\/[a-z]+){3}/)){
var a = pi.split('/');
pi = '/'+a[1]+'/'+a[2];
}
var curnav = leftnav.find('li a[href="'+pi+'"]'); //当前点击的a
if(curnav.length&&!curnav.find('a').hasClass('active')){
leftnav.find('a.active').removeClass('active'); //移除以前存在的active
curnav.addClass('active'); //给当前点击的添加active类
}
})();