PDA

View Full Version : Tab Content Script (v 2.2)



Shammus
03-19-2009, 05:11 PM
1) Script Title: Tab Content Script (v 2.2)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Describe problem:

Not a problem actually, this script works really well. I'm working with Demo #3 and my question is, if you click on Tab 3, for instance, and then refresh/reload the page, the Tab 3 content stays clicked. Is there a way to have this default back to Tab 1 and it's content being displayed everytime the page loads?

Thanks in advance....

ddadmin
03-19-2009, 07:23 PM
Demo #3 by default has persistence of the tab state turned on, and hence the behavior you see. You can turn it off:


<script type="text/javascript">

var mypets=new ddtabcontent("pettabs")
mypets.setpersist(false)
mypets.setselectedClassTarget("link")
mypets.init(2000)

</script>

Shammus
03-19-2009, 07:51 PM
Much appreciated, that worked!