Hi everyone,
Can anyone help me amending this script Example 2 at http://www.dynamicdrive.com/dynamici...edcollapse.htm I've change it a bit but contents are loading under each other they should load at same place, here is the code
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script type="text/javascript" src="animatedcollapse.js"> /*********************************************** * Animated Collapsible DIV- © 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> <a href="javascript:collapse1.slideit()">Tab 1</a> <a href="javascript:collapse2.slideit()">Tab 2</a> <div id="cat" style="width: 917px; background-color: #99E0FB;"> <!--Your DIV content as follows. Note to add CSS padding or margins, do it inside a DIV within the Collapsible DIV --> <div style="padding: 0 5px"> <h3>Content inside DIV!</h3> <h3>Content inside DIV!</h3> <h4>Note: No CSS height attribute defined. Persistence enabled.</h4> </div> </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("cat", 800, true) </script> <div id="cat2" style="width: 917px; background-color: #99E0FB;"> <!--Your DIV content as follows. Note to add CSS padding or margins, do it inside a DIV within the Collapsible DIV --> <div style="padding: 0 5px"> <h3>Content inside DIV!</h3> <h3>Content inside DIV!</h3> <h4>Note: No CSS height attribute defined. Persistence enabled.</h4> </div> </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse2=new animatedcollapse("cat2", 800, true) </script>



Reply With Quote

thanks alot for your help and all those who read my post to help, I will ask more and more from you guys cause I believe "Question is the first step towards learning"

Bookmarks