Skip to content

Instantly share code, notes, and snippets.

View SY6Dave's full-sized avatar

David Mortiboy SY6Dave

View GitHub Profile
@wireframe
wireframe / gist:75088
Created March 6, 2009 21:53
jquery plugin to truncate elements based on height instead of number of characters
/*
truncates elements that pass a certain height.
adds a "view more" link to display the rest of the content.
a different approach than standard truncation which relies on character counting.
character counting may not be desireable when elements have short words, but a
number of line breaks.
usage:
//using defaults