PDA

View Full Version : animated collapsable div and scroll to top



joaoricardo
04-27-2010, 02:15 PM
1) Script Title:

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm
http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.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?!
:confused:

ddadmin
04-28-2010, 07:42 PM
Well, you can directly call the function:


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:


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

joaoricardo
05-01-2010, 06:39 PM
Well, you can directly call the function:


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:


<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.

joaoricardo
05-11-2010, 04:36 PM
it doesnt work.....have u got another solution?!?! could really use some help.....
cheers
j


Well, you can directly call the function:


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:


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