SlabText: Bold Headlines jQuery Plugin

slabtext

slabText is a jQuery plugin that splits headlines into rows before resizing each row to fill the available horizontal space. The ideal number of characters to set on each row is calculated by dividing the available width by the CSS font-size – the script then uses this ideal character count to split the headline into word combinations that are displayed as separate rows of text.

Here are a few things to remember when using the plug-in:

  1. Headlines with lots of horizontal space to fill are more gracefully displayed across browsers.
  2. Headlines with little horizontal space tend to have jagged right edges, especially if the rows have been preset within the markup and each row has a wildly varying letter-count. Firefox appears to be the best at resizing-to-fit the word combinations and some fonts tend to be better than others at being resized-to-fit.
  3. The element to be given the slabText treatment has its (inner)HTML replaced entirely (by using the jQuery .html method), which means that all images and links contained within will disappear without a trace.
  4. Unlike the original slabtype algorithm, vertical space is not taken into consideration at all.
  5. I’ve no idea how the script behaves in a right-to-left environment.
  6. Untested in older versions of IE although, in theory, there’s nothing that even IE6 can’t handle.
  7. Always call the script after all fontface fonts have downloaded (if using). I’ve hacked this for the demo to enable you to see the headline transformation as the script kicks-in but you should always use google WebFont loaders active() and inactive() callbacks to launch the slabText treatment (or a similar "font loaded" callback feature from another font provider).

Demo & Download: http://www.frequency-decoder.com/demo/slabText/
 
SPONSOR RECOGNITION

Search Box

Latest Resources

caroufredsel CarouFredSel is a free circular, responsive jQuery carousel that turns any kind of HTML element into a...
scrolls-image-gallery This is a PHP and jQuery image gallery developed by tympanus called Fresh Sliding Thumbnails...
jquery-circular-plugins There is many great jQuery circular plugin that help you to create beautiful circular switches like volume...
joomla-admin-tool A professional admin tool like wordpress admin panel for joomla 2.5+ called JSN PowerAdmin developed by...
joomla-testimonials Today, Joomlavisually review a free extension that you will be able to add a page with testimonials and...
html5-joomla-contact-form This is free visual joomla contact form module based on html5 and css3 developed by www.nsdh.nl called JIH...
k2-extra-fields-checkbox Sometime we need MultiSelect with Checkbox if you are using Joomla K2, but K2 missing this functions, now...
joomla-social-counters In this post, Joomlavisually will gather free extensions including modules and plugins that will help you...
maintenance-mode Top Free Under Construction (Coming Soon) WordPress Themes is the way to put your blog to offline mode for...
crafted-timelines Timeline is also great for pulling in media from different sources. It has built in support for pulling in...

About & Suggest

joomlavisually.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries. If you want to avail this great opportunity to write for us, please contact at joomlavisually[@]gmail.com.
Copyright © 2008 - 2012 Design by Joomla Visually, All Rights Reserved.