Log In · Register

 
COLLAPSABLE MODULES..., my code for it isnt working! PLEASE HELP!
ShootingStar80
post Aug 26 2006, 03:24 PM
Post #1


Newbie
*

Group: Member
Posts: 2
Joined: Aug 2006
Member No: 458,226



i found a code for a collapsable module, and i really like it, it works when you put it on your xanga without any thing in it, but then when you type stuff in the modules, it stops working...
can someone tell me if maybe theres something wrong with the coding....
CODE
<!-- begin code provided by createblog.com -->

<style type=text/css>
/* edit to your liking */
table.module { border: 1px solid #FFFFFF; width:160px; background-color:#000000; }
table.module th { background-color: #000000;font: normal 10px franklin gothic medium; text-transform: normal;color: #ffffff; border: none; }
table.module td {color: #ffffff; text-align: left; border: none; background-image: none; }
</style>

<!-- add this below all the CSS -->

<table border=0 width="660"><tr><td valign="top" width="160">
<table border="1" cellspacing="0" cellpadding="4" width="100%" class="module"><tr><th valign="top" align="left" class="module"><b></b></th></tr><tr><td valign="top" class="module">
<style type="text/css">
.menutitle{
cursor:pointer;
margin-bottom: 5px;
background-color:#000000;
color:#ffffff;
width:140px;
padding:2px;
text-align:center;
font-weight:bold;
/*/*/border:1px solid #ffffff;/* */
}

.submenu{
margin-bottom: 0.5em;
}
</style>

<script type="text/javascript">

/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
    if(document.getElementById){
    var el = document.getElementById(obj);
    var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
  if(el.style.display != "block"){ //DynamicDrive.com change
      for (var i=0; i<ar.length; i++){
    if (ar[i].className=="submenu") //DynamicDrive.com change
    ar[i].style.display = "none";
      }
      el.style.display = "block";
  }else{
      el.style.display = "none";
  }
    }
}

</script>

<!-- Keep all menus within masterdiv-->
<div id="masterdiv">

    <div class="menutitle" onclick="SwitchMenu('sub1')">TITLE</div>
    <span class="submenu" id="sub1">
    WHATEVER YOU WANT HERE
  
  
    </span>

    <div class="menutitle" onclick="SwitchMenu('sub2')">TITLE</div>
    <span class="submenu" id="sub2">
    WHATEVER YOU WANT HERE
    </span>


    <div class="menutitle" onclick="SwitchMenu('sub3')">TITLE</div>
    <span class="submenu" id="sub3">
    WHATEVER YOU WANT HERE
    </span>


    <div class="menutitle" onclick="SwitchMenu('sub4')">TITLE</div>
    <span class="submenu" id="sub4">
    WHATEVER YOU WANT HERE
  
  
    </span>

    <div class="menutitle" onclick="SwitchMenu('sub5')">TITLE</div>
    <span class="submenu" id="sub5">
    WHATEVER YOU WANT HERE
    </span>


    <div class="menutitle" onclick="SwitchMenu('sub6')">TITLE</div>
    <span class="submenu" id="sub6">
    WHATEVER YOU WANT HERE
    </span>


    
</div></td></tr></table><br>
</td>
<!-- end code provided by createblog.com -->
 
 
Start new topic
Replies
ShootingStar80
post Aug 30 2006, 11:41 AM
Post #2


Newbie
*

Group: Member
Posts: 2
Joined: Aug 2006
Member No: 458,226



actually i fugured it out and i was about to say so...

SO MODS, PLEASE CLOSE THIS THREAD...

thanks for trying to help though!!!
 

Posts in this topic


Closed TopicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: