Sha256: 98ed8b5e5a23f2a0667a7f1a6bd68ca55b0625e835e172b3eb44706441fb0492
Contents?: true
Size: 980 Bytes
Versions: 12
Compression:
Stored size: 980 Bytes
Contents
// Generated by CoffeeScript 1.4.0 /* * * jQuery ResponsiveText by Gary Hepting - https://github.com/ghepting/responsiveText * * Open source under the BSD License. * * Copyright © 2013 Gary Hepting. All rights reserved. * */(function(){(function(e){var t;t=[];e.fn.responsiveText=function(n){var r;r={compressor:n.compressor||10,minSize:n.minSize||Number.NEGATIVE_INFINITY,maxSize:n.maxSize||Number.POSITIVE_INFINITY};return this.each(function(){var n;n=e(this);n.attr("data-compression",r.compressor);n.attr("data-min",r.minSize);n.attr("data-max",r.maxSize);n.css("font-size",Math.floor(Math.max(Math.min(n.width()/r.compressor,parseFloat(r.maxSize)),parseFloat(r.minSize))));return t.push(n)})};return e(window).on("resize",function(){return e(t).each(function(){var t;t=e(this);return t.css("font-size",Math.floor(Math.max(Math.min(t.width()/t.attr("data-compression"),parseFloat(t.attr("data-max"))),parseFloat(t.attr("data-min")))))})})})(jQuery)}).call(this);
Version data entries
12 entries across 12 versions & 3 rubygems