Results 1 to 4 of 4

Thread: animated collapsable div and scroll to top

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

    Default animated collapsable div and scroll to top

    1) Script Title:

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

    3) Describe problem: I'd like to know if there is a way to scroll the clicked div to the top of the page using 'scroll to top .js'

    my links trigger the div to collapse but sometimes the images inside the div are not shown so i want the links to go to the top of the pages when they are clicked so the user can see the images in full.

    //example
    <p>
    <a class="des" href="javascript:animatedcollapse.toggle('explorando')">
    < explorando >______________________________________________________________design</a>
    </p>

    <div id="explorando" style="background: white; width: 480px; display:none">

    <img src="exploring.jpg" width="370" border="0" onmouseover="Tip('Arte para poster, Idéia livre feito na Unversidade sem fim determinado. Exercício de abstração', BGCOLOR, 'red', FONTCOLOR, 'white', OPACITY, 90, TEXTALIGN, 'justify', BORDERWIDTH, 0, FONTSIZE, 13, FONTFACE, 'trebuchet ms', WIDTH, 250, FADEIN, 500, FADEOUT, 500)" onmouseout="UnTip()" />
    </div>

    /////////////////////
    how can i position the clicked link to the top of the page so people will be able to see the full image without scrolling the page up or down?!

    help, please?!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well, you can directly call the function:

    Code:
    scrolltotop.scrollup()
    for "Scroll To Top script" to get it to scroll to the top of the page. Here's a link that when clicked on does this:

    Code:
    <a href="# onClick="scrolltotop.scrollup()">Scroll Up</a>
    DD Admin

  3. #3
    Join Date
    Aug 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Well, you can directly call the function:

    Code:
    scrolltotop.scrollup()
    for "Scroll To Top script" to get it to scroll to the top of the page. Here's a link that when clicked on does this:

    Code:
    <a href="# onClick="scrolltotop.scrollup()">Scroll Up</a>
    thx i will try that.

    but i want the clicked links to go to the top of the pages. like the div collapse and then the entire page goes to top so the user can see the images in full.

  4. #4
    Join Date
    Aug 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it doesnt work.....have u got another solution?!?! could really use some help.....
    cheers
    j

    Quote Originally Posted by ddadmin View Post
    Well, you can directly call the function:

    Code:
    scrolltotop.scrollup()
    for "Scroll To Top script" to get it to scroll to the top of the page. Here's a link that when clicked on does this:

    Code:
    <a href="# onClick="scrolltotop.scrollup()">Scroll Up</a>

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
  •