|
#1
|
|||
|
|||
|
1) Script Title: Animated Collapsible DIV v2.01
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...edcollapse.htm 3) Describe problem: this is a general question rather than a problem, which i need to know the answer to before beginning working with this script. is it possible to get this script to automatically execute a number of seconds after a page loads? i'd like a div to collapse to a third of its height say 5 seconds after the page loads. thanks in advance. |
|
#2
|
||||
|
||||
|
I don't know if you can get it to collapse a third of its height, but you can get it to expand 5 seconds after the page loads. Find the red code below in your html, and add the blue.
Code:
<script type="text/javascript" src="animatedcollapse.js">
/***********************************************
* Animated Collapsible DIV v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
window.onLoad=setTimeout("animatedcollapse.show(['jason', 'kelly', 'michael']);",5000);
</script>
__________________
|
|
#3
|
||||
|
||||
|
Regarding Nile's code, just as a correction, it should be:
Code:
<script type="text/javascript" src="animatedcollapse.js">
/***********************************************
* Animated Collapsible DIV v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
<script type="text/javascript">
window.onLoad=setTimeout("animatedcollapse.show(['jason', 'kelly', 'michael']);",5000);
</script>
|
|
#4
|
||||
|
||||
|
A question, not an argument: Whats the difference between putting the onload in a different script section? Why can't you just put it in the first one?
@ddadmin I've thought about this, and I wonder is it possible to set the height in the show function. And with that the JavaScript would give it a max-height?
__________________
|
|
#5
|
||||
|
||||
|
Quote:
Quote:
slideDown() and slideUp() function for its animations, which would need to be replaced.
|
|
#6
|
||||
|
||||
|
Ahh, ok. I get it.
__________________
|
|
#7
|
|||
|
|||
|
thanks for the help, everyone. no doubt i'll be back for more!
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|