From fdea8281427942b7637a8077eb7fab37c4b9fbcd Mon Sep 17 00:00:00 2001
From: InsertSweat <769356353@qq.com>
Date: Mon, 9 Jan 2017 23:49:42 +0800
Subject: [PATCH] update catalog.js
---
js/jquery-catalog.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/jquery-catalog.js b/js/jquery-catalog.js
index 1feb18e..da1958c 100644
--- a/js/jquery-catalog.js
+++ b/js/jquery-catalog.js
@@ -1 +1 @@
-(function(a){a.fn.catalog=function(b){var c=a.extend({"box":".catalog"},b),d=this.children(":header");return this.each(function(){var h=function(){d.map(function(l,m){var k="catalog"+"-"+m.tagName+"-"+l;m.id=k})};var g=function(){var m=[],l=d[0].tagName.charAt(1),n=0,k=null;m[0]=a("
");m[0].appendTo(a(c.box));d.map(function(o,p){k=a("");k.append(''+p.innerHTML+"");if(l>p.tagName.charAt(1)){n-=parseInt(l)-parseInt(p.tagName.charAt(1))}else{if(l");prevLi.append(m[n])}}l=p.tagName.charAt(1);m[n].append(k);prevLi=k})};var f=function(){a(c.box+" a").click(function(){a(window).unbind("scroll");var l=this;a("body").animate({scrollTop:a(a(l).attr("href")).offset().top},"fast",function(){i()});e(a(l));(function(m){m.fn.catalog=function(n){var p=m.extend({"box":".catalog"},n),o=this.children(":header");return this.each(function(){var s=function(){o.map(function(x,w){var y="catalog"+"-"+w.tagName+"-"+x;w.id=y})};var t=function(){var w=[],x=o[0].tagName.charAt(1),z=0,y=null;w[0]=m("
");w[0].appendTo(m(p.box));o.map(function(B,A){y=m("");y.append(''+A.innerHTML+"");if(x>A.tagName.charAt(1)){z-=parseInt(x)-parseInt(A.tagName.charAt(1))}else{if(x");prevLi.append(w[z])}}x=A.tagName.charAt(1);w[z].append(y);prevLi=y})};var u=function(){m(p.box+" a").click(function(){m(window).unbind("scroll");var w=this;m("body").animate({scrollTop:m(m(w).attr("href")).offset().top},"fast",function(){r()});v(m(w));return false})};var r=function(){m(window).scroll(function(){o.map(function(x,w){if(m(window).scrollTop()>w.offsetTop){v(m(p.box+' a[href="#'+w.id+'"]'))}})})};var v=function(w){m(p.box+" a").removeClass("active");w.addClass("active");m(p.box+" ol > li > ol").hide();m(p.box+" .active").parents("ol").show();m(p.box+" .active ~ ol").show()};var q=function(){s();t();m(p.box+" ol > li > ol").hide();u();r()};q()})}})(window.jQuery);function k(o,m){var n="你好";alert("hello world")}return false})};var i=function(){a(window).scroll(function(){d.map(function(k,l){if(a(window).scrollTop()>l.offsetTop){e(a(c.box+' a[href="#'+l.id+'"]'))}})})};var e=function(k){a(c.box+" a").removeClass("active");k.addClass("active");a(c.box+" ol > li > ol").hide();a(c.box+" .active").parents("ol").show();a(c.box+" .active ~ ol").show()};var j=function(){h();g();a(c.box+" ol > li > ol").hide();f();i()};j()})}})(window.jQuery);
+(function(a){a.fn.catalog=function(b){var c=a.extend({"box":".catalog"},b),d=this.children(":header");return this.each(function(){var h=function(){d.map(function(m,n){var l="catalog"+"-"+n.tagName+"-"+m;n.id=l})};var g=function(){var n=[],m=d.length!=0?d[0].tagName.charAt(1):0,o=0,l=null;n[0]=a("
");n[0].appendTo(a(c.box));d.map(function(p,q){l=a("");l.append(''+q.innerHTML+"");if(m>q.tagName.charAt(1)){o-=parseInt(m)-parseInt(q.tagName.charAt(1))}else{if(m");prevLi.append(n[o])}}m=q.tagName.charAt(1);n[o].append(l);prevLi=l})};var j=false;var f=function(){a(c.box+" a").click(function(){j=true;var l=this;a("body").animate({scrollTop:a(a(l).attr("href")).offset().top},"fast",function(){j=false});e(a(l))})};var i=function(){a(window).scroll(function(){d.map(function(l,m){if(a(window).scrollTop()>m.offsetTop){if(!j){e(a(c.box+' a[href="#'+m.id+'"]'))}}})})};var e=function(l){a(c.box+" a").removeClass("active");l.addClass("active");a(c.box+" ol > li > ol").hide();a(c.box+" .active").parents("ol").show();a(c.box+" .active ~ ol").show()};var k=function(){h();g();a(c.box+" ol > li > ol").hide();f();i()};k()})}})(window.jQuery);