On a related issue, does anyone have a nice way for passing "arguments" to a jquery function from the html, while still using jquery selectors (i.e. not calling the function from an inline event handler)?
I whipped up a truncate function not too long ago that truncates a block of text to a certain word count and adds a "more" link to reveal the whole thing. I wanted to add a feature where I could specify from the HTML what word count the block should be truncated through. I ended up using the class...e.g. <div class="truncate 30">...</div> would truncate the text in the block to 30 words.
Just curious, in the spirit of this article, if anyone had any alternative approaches or better suggestions.