Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
/*<![CDATA[*/
.item {
width:100px;height:20px;background-Color:#FFFFCC;
}
.active {
background-Color:#FFCC66;
}
.content {
display:none;width:100px;height:200px;background-Color:#CCFFFF;
}
/*]]>*/
</style>
<script type="text/javascript">
/*<![CDATA[*/
function Toggle(i,c){
c=document.getElementById(c);
c.style.display=zxcSV(c,'display')=='none'?'block':'none';
i.className=(zxcSV(c,'display')=='none')?i.className.replace(' active',''):i.className+' active';
}
function zxcSV(obj,par){
if (obj.currentStyle) return obj.currentStyle[par.replace(/-/g,'')];
return document.defaultView.getComputedStyle(obj,null).getPropertyValue(par.toLowerCase());
}
/*]]>*/
</script>
<title></title>
</head>
<body>
<div class="item" onclick="Toggle(this,'c1');"></div>
<div id="c1" class="content" ></div>
</body>
</html>
Bookmarks