city_coder
04-22-2010, 09:41 PM
hi guys,
i know this has been on here before but i just cant seem to find anything, or know what to search for.
Everyone has seen it, i just want pointing in the right direction.
Just a bit of js that will check to see how many words are in a div that is being populated from a db, analyse if it is longer than it should be (ie by height of the div or by max number of words) and create a little '[...]' link that will slide down the rest of the text.
I also remember seeing somewhere, years ago, that the js had the ability to see if the amount only went over by a few words, then it would just show them instead of bothering with hiding them & providing a link to show them.
So just a link or 2 just to point me in the right direction please guys, or if your feeling particularly helpful then some code would be great :D
cheers
i know this has been on here before but i just cant seem to find anything, or know what to search for.
Everyone has seen it, i just want pointing in the right direction.
Just a bit of js that will check to see how many words are in a div that is being populated from a db, analyse if it is longer than it should be (ie by height of the div or by max number of words) and create a little '[...]' link that will slide down the rest of the text.
I also remember seeing somewhere, years ago, that the js had the ability to see if the amount only went over by a few words, then it would just show them instead of bothering with hiding them & providing a link to show them.
So just a link or 2 just to point me in the right direction please guys, or if your feeling particularly helpful then some code would be great :D
cheers