SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    In need of simple adjustment of jquery "read more" plugin

    This plugin http://viralpatel.net/blogs/demo/jqu...tened-content/

    Two things. Should be simple to the trained eye. I would like to add a smooth animation to its open and close. And two can you see why it adds two characters to any given word it cuts short when it shows the remainder of the text?

    I would just use expander plugin http://plugins.learningjquery.com/expander/ but when it shows more of the text it does it with inline-block so the remander of the text drops down on the next line a if a br was inserted. Maybe I was doing that wrong somehow. But could not see why.

    Thanks,
    Eric

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I think I figured out the expander plugin. Ill post back if I am wrong

  3. #3
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Nope I couldn't figure out either issue. From what I can tell that just how the expander plugin works. Pretty lame if you ask me.

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi EricWatson,

    I would like to suggest you that if you just want to implement the expand and collapse functionality for "read more". Then you can achieve it by using jquery, without any extra plugin. You will just have to make some small changes and you get functionality working. If this sounds interesting to you then just reply back to this post, so that i ll provide you the details.

  5. #5
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Ya that would be fine and dandy but I believe that would not put the "MORE/LESS" links directly after the expanded and calapsed content.

    Meaning there would be break like this...
    LESS

    instead of this... LESS

  6. #6
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Nada? Or anyone know of another plugin that does this? To recap I simply want a READ MORE link to display after the ellipsis text and a READ LESS link to display when it's opened. And it animates open and closed. For such a simple task I'm surprised my googlefu can't find it.

  7. #7
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,048
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi Eric,

    I've just woken up, so exuse the obvious question:
    You want this plugin to animate open and shut, as opposed to just showing and hiding the content.
    http://viralpatel.net/blogs/demo/jqu...tened-content/

    Is that correct?

  8. #8
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Thanks Pullo. I got the expander plugin working though. The trick was to put it on the containing "p" and not an outside container. And then to make a paragraph break like two paragraphs I had to insert a empty span with some margin seen here http://www.websitecodetutorials.com/


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
  •