Advanced Search

Results 1 to 3 of 3

Thread: Switch Content Script - collapsing long text

  1. #1
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Content Script - collapsing long text

    1) Script Title: Switch Content Script

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

    3) Describe problem: Hi, I've been able to setup your script on an information page of mine and the script itself works superbly. There is one thing that I hope can be improved for my situation: I have 5-8 contracted headers to start with. Each of them has quite a bit of hidden text to expand. So when I hit the first header, the text expands and the rest of the headers move down and off the screen. When I scroll down to the end of the expanded text and press the second header, the first one contracts, the second one expands at its original position, but the screen remains at its current spot. This means that the screen now only shows halfway the expanded text of the second header. So I have to scroll up again to the beginning of the new text.

    Would it be possible to add some coding to automatically jump to the first line of the expanded text each time you hit a header?

    Thanks,
    Koen

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

    Default

    --bump--

    I'm having this same issue. Is there a fix?

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,886
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    Would an HTML anchor not suffice?

    Something like this?

    Code:
    <h3 id="bobcontent1-title" class="handcursor"> <a href="#jump"> What is JavaScript? </a> </h3>
    <div id="bobcontent1" class="switchgroup1">
    <a name="jump"></a> JavaScript is a scripting language originally developed by Netscape to add interactivity
    and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
    </div>
    Last edited by keyboard; 10-19-2012 at 11:57 AM. Reason: Format: Code Tags
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

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
  •