初始提交,bootstyle--bootstrap风格B3log皮肤

This commit is contained in:
lucao
2012-12-13 17:20:16 +08:00
parent 354b486432
commit a90b430886
49 changed files with 10466 additions and 0 deletions

20
bootstyle/js/bootstyle.js Normal file
View File

@@ -0,0 +1,20 @@
var bootstyle = {
setNavCurrent: function(){
$(".nav li a").each(function () {
var $this = $(this);
var path1 = latkeConfig.servePath + location.pathname,
path2 = latkeConfig.servePath + location.pathname.substr(0,location.pathname.length-1);
if ($this.attr("href") === path1 || $this.attr("href") === path2) {
$this.parent().addClass("active");
} else if (/\/[0-9]+$/.test(location.pathname)) {
$(".nav li")[0].className = "current";
}
});
},
init:function(){
this.setNavCurrent();
}
};
$(function(){
bootstyle.init();
})