This commit is contained in:
Van
2016-10-11 20:11:34 +08:00
parent 5ffc1d19ac
commit 72b70b53d6
38 changed files with 73 additions and 416 deletions

View File

@@ -30,6 +30,8 @@ var Yilia = {
*/
init: function () {
Util.killIE();
this._initToc();
this.resetTags();
$(window).scroll(function () {
@@ -54,6 +56,17 @@ var Yilia = {
$(window).scroll();
},
_initToc: function () {
if ($('.b3-solo-list li').length === 0) {
return false;
}
$('.side footer').after('<div class="toc"><a href="javascript:$(\'.side .toc\').hide()" class="close">X</a></div>');
$('.side .toc a').after($('.b3-solo-list'));
$('.side .toc-btn').show();
},
resetTags: function () {
$("a.tag").each(function (i) {
$(this).addClass("color" + Math.ceil(Math.random() * 4));