Results 1 to 3 of 3

Thread: (HELP) truncate comments for each user

  1. #1
    Join Date
    Mar 2007
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default (HELP) truncate comments for each user

    Hi

    I wanted to know if someone knows any script that will truncate a users comment to maximum 300 words and then when you click on "read more" it will show the whole comment and when you click again it will bring it back to 300 words. Like lets say a truncate function combined with a toggle +/-.

    Below is the URL to my demo truncate function but that only works once like you click on "Read more" and it will show the whole comment but then you cannot switch back to 300 words. Also I want so when you click on one comment to read more, any other comment you have clicked will close it back to 300 words.

    Code:
    http://www.desi-fun.com/demo.html
    Hope you understand.

    Thanks alot

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Take a look at this script. It's close to what you're asking for, I think. When you click on one, the other open ones collapse. Or you can open or close all of them at once.

    http://www.dynamicdrive.com/dynamici...tchcontent.htm

  3. #3
    Join Date
    Mar 2007
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I know I have checked that one out but it doesn't do everything .

    I have the javascript function that does about 75% of the work. It truncates the comment to 200 words and then when you click on "readmore" it shows the rest of the comment but what it does not have is the ability to close it back to 200 words/or it should close back when you click on another comment. If someone could alter my code to do that it would be great.

    check out the demo and you will know what I mean.

    Code:
    http://www.desi-fun.com/demo.html

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •