plugins.js
1.51 KB
!function(){for (var a, b = function(){}, c = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "exception", "group", "groupCollapsed", "groupEnd", "info", "log", "markTimeline", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], d = c.length, e = window.console = window.console || {}; d--; )a = c[d], e[a] || (e[a] = b)}(), function(a){function b(b, c, d, e){var f = b.text(), g = f.split(c), h = ""; g.length && (a(g).each(function(a, b){h += '<span class="' + d + (a + 1) + '" aria-hidden="true">' + b + "</span>" + e}), b.attr("aria-label", f).empty().append(h))}var c = {init:function(){return this.each(function(){b(a(this), "", "char", "")})}, words:function(){return this.each(function(){b(a(this), " ", "word", " ")})}, lines:function(){return this.each(function(){var c = "eefec303079ad17405c889e092e105b0"; b(a(this).children("br").replaceWith(c).end(), c, "line", "")})}}; a.fn.lettering = function(b){return b && c[b]?c[b].apply(this, [].slice.call(arguments, 1)):"letters" !== b && b?(a.error("Method " + b + " does not exist on jQuery.lettering"), this):c.init.apply(this, [].slice.call(arguments, 0))}}(jQuery), function(a){a.fn.fitText = function(b, c){var d = b || 1, e = a.extend({minFontSize:Number.NEGATIVE_INFINITY, maxFontSize:Number.POSITIVE_INFINITY}, c); return this.each(function(){var b = a(this), c = function(){b.css("font-size", Math.max(Math.min(b.width() / (10 * d), parseFloat(e.maxFontSize)), parseFloat(e.minFontSize)))}; c(), a(window).on("resize", c)})}}(jQuery);