One solution for this is to show an abbreviated version of the title, possibly ending with a "...", and then let "hover" (in an increasingly touchscreen world, hover is often deprecated, though iOS tends to let a quick tap act as a hover) show the full title. While refactoring our "activity tiles" at Alleyoop, I decided to wrap our solution to this issue as a jQuery plugin, So I introduce to you:
trunKit.alienbill.com
I've posted an example of it in action below, but more information is there on the project site or its github repository.
Wrapping the functionality as a jQuery was easy: I'd recommend jMar's simple guide. The short of it is using a tiny bit of boilerplate, you're implementing an "each()" function (so your code can be daisy-chained) and then there's a nice method to allow for a hash of configuration options, but with sensible defaults.
Here it is in action:
This is the first example that I…
My second example is not…
but by placing three examples,…
But this is short.
There's likely dozens of similar plugins already out there, but this is mine, and I learned a bit from making it and packaging it as a plugin...
No comments:
Post a Comment