1
0
mirror of https://github.com/danog/mklwp.git synced 2024-12-04 18:48:05 +01:00
mklwp/javascripts/headsmart.min.js

1 line
380 B
JavaScript
Raw Normal View History

2015-12-30 19:21:33 +01:00
(function(a){a.fn.headsmart=function(){var c=a(this);d();function d(){var e=[],g="";if(b("h1")){e.push("h1")}if(b("h2")){e.push("h2")}if(b("h3")){e.push("h3")}if(b("h4")){e.push("h4")}if(b("h5")){e.push("h5")}if(b("h6")){e.push("h6")}for(var f=0;f<e.length;f++){c.children(e[f]).addClass("header-level-"+(f+1))}}function b(f){return(c.children(f).length>0)?true:false}}})(jQuery);