PDA

View Full Version : Hidden DIV default to show



mystic7
10-08-2009, 03:36 PM
1) Script Title: Animated Collapsible DIV v2.4

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem: I have a site where each "page" of the site is contained in a hidden DIV using this script. What I would like is for the "index page" to show by default when the site is loaded in the browser. It's the DIV I named "home" in my code below. I've tried messing with "hide", "show", etc. but they all default to hidden when the site first loads.

What do I need to change or add to the script to have the "home" DIV always default to show when the site is first loaded? Here's my "customized" script as of now


<script type="text/javascript">
animatedcollapse.addDiv('home', 'fade=1,speed=400,group=pets,persist=1,hide=0')
animatedcollapse.addDiv('poll', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('contact', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('advertise', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('adrate', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('adsub', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('ouradvertisers', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('issues', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('stylists', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('stylistswanted', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('about', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('team', 'fade=1,speed=400,group=pets,persist=0,hide=1')
animatedcollapse.addDiv('founder', 'fade=1,speed=400,group=pets,persist=0,hide=1')


animatedcollapse.init()

</script>

mystic7
10-08-2009, 06:14 PM
Nevermind, got it. I had to remove all the "persists", now it works fine. Thanks, mystic7! You're welcome, mystic7!