Vertical Text Resize Function

// Font Resize on Homepage function flowTextMethods(el, ratio) { var width = $j(window).width(); if (width <= 960 && width >= 319) { var increment = 2.56, curWidth = 1024 - width, percentile = curWidth / increment, invertedPercentage = 100 - percentile, emNumber = percentile / ratio, realEm = 100 - emNumber; $j(el).css('font-size', ''); $j(el).css('font-size', '0.' + realEm.toFixed() +'em'); } else if (width <= 320 && width > 200) { var increment = 0, curWidth = 1024 - width, percentile = curWidth / increment, invertedPercentage = 100 - percentile, emNumber = percentile / ratio, realEm = 100 - emNumber; $j(el).css('font-size', ''); $j(el).css('font-size', '0.' + realEm.toFixed() +'em'); } else { $j(el).css('font-size', ''); } } function flowText() { flowTextMethods('.middle-sideboxes', 5); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.