public marks

PUBLIC MARKS from ycc2106 with tags javascript & tips

May 2006

Sidebar expand/collapse sub-categories using javascript RSS/linkrolls

Hi justin, have you found you hide/show system? If yes I would love to see it. Finaly I wrote one myself as other were also asking. Tell me what you think, is it easy to understand?

March 2006

February 2006

Truncate HTML Text with JavaScript Automatically

This article describes what I think is a clever way of automatically truncating the text of a paragraph: * Truncate the text to a length of your choosing * Do not truncate in the middle of a word (only on a word boundary) * Keep the page search-engine friendly by publishing the complete non-truncated text * Add an ellipsis to the end of the truncated text * Make the ellipsis a link that expands the text to full length. Once expanded it cannot be collapsed again (but that functionality could be added just as easily) * Assumes that the content is plain text with no markup.