Results 1 to 5 of 5

Thread: Switch Content Script at end of paragraph.

  1. #1
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Content Script at end of paragraph.

    1) Script Title: Switch Content Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tchcontent.htm

    3) Describe problem: Looking to see if it is possible to put the 'expander' at the end of a paragraph, like this...

    *************
    Deck chairs can be relaxing but erecting them can be troublesome [more...]
    *************
    to reveal –
    *************
    Deck chairs can be relaxing but erecting them can be troublesome [less...]
    Many comedy sketches have been used over the years to highlight the pitfalls etc. ...
    *************

    With [more...] & [less...] being the activators.

    Many thanks

    OD

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

    Default

    Hi,
    This is a great script, and I've got everything working fine, except that I am also, just like you, trying to do move the expander image to the end of the paragraph, but have not succeeded.
    Did you find a solution?
    (Additionally I would also like to only use the open expander, but omit the image for closed.)

    Best regards,
    Cecilia

  3. #3
    Join Date
    Sep 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 90% Solution

    Hi,

    Yes I did (no help from here yet!)

    I fiddled around a bit and found that if I did this -
    <div>Some text here and then
    <a id="text1-title" class="handcursor"></a></div>
    <div><p id="text1" class="vsgroup">extra text here</p>
    </div>

    and change the line - vstext.setStatus('[less...] ', '[more...] ')

    it gives me -

    Some text here and then [more...]

    which expands to

    Some text here and then [less...]
    extra text here

    You can change the colours - e.g. vstext.setColor('999999', '505050')

    I still can't get it to work in the same line. Always starts a new paragraph but its good enough for now.

    Can't show it working as the site is still in production.

    Hope this helps.

    OD

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That uses two seperate divs. That won't allow them to be on the same line.
    Not too much you can do about that, without recoding a lot.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Orlando,
    Great, I will try this out at once!

    Cecilia

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
  •