Tutorial :jQuery: split and hide html data


I need to split somehow some html data (a text with html tags) into two parts and hide the second one with a show/hide link.

The thing is all texts are being stored in the database with html tags. Some of those texts are short, but some are really long. We don't want't to show long ones, so one of the options is to show a teaser with a show/hide link. I can't just cut the string though (let's say first 300 characters), because it'll break html code of the page.

I'm looking for a solution/suggestions how to show a teaser of the text using jQuery without breaking the html code of the page.

Thank you.


have you looked at expader ? looks like that is what your looking for

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »