You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
788 B
1 line
788 B
7 years ago
|
var sowb=window.sowb||{};!function(t){t.fn.fitText=function(i,n){var e=i||1,o=t.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},n);return this.each(function(){var i=t(this),n=function(){i.css("font-size",Math.max(Math.min(i.width()/(10*e),parseFloat(o.maxFontSize)),parseFloat(o.minFontSize)))};n(),t(window).on("resize.fittext orientationchange.fittext",n)})}}(jQuery),jQuery(function(t){sowb.runFitText=function(){t(".so-widget-fittext-wrapper").each(function(){var i=t(this),n=i.data("fitTextCompressor")||.85;i.find("h1,h2,h3,h4,h5,h6").each(function(){var i=t(this);i.fitText(n,{maxFontSize:i.css("font-size")})}),i.data("fitTextDone",!0),i.trigger("fitTextDone")})},t(sowb).on("setup_widgets",sowb.runFitText),sowb.runFitText()}),window.sowb=sowb;
|