Dear Webmasters, I can not deal with javascript, generally need to the menu when you click on the item subcategories remained open after the transition this category which crossed. To keep open the list, and I get it when going slams, here's the code:
tags in the head:
code:
the menu itself:
How to implement javascript?
Thanks!
tags in the head:
code:
Code:
<style type="text/css">
ol {display:none;}
</style>
<script type="text/javascript">
function shouNone(el){
var s;
el=el.getElementsByTagName("ol")[0].style;
s=el.display;
if(s=="none"||s==""){el.display="block";}
else{el.display="none";};
};
</script>
the menu itself:
Code:
<li class="catsub" onclick="shouNone(this);" ondblclick="location.href='http://site.com/cat1.html'">
<a href="javascript:void(0)">Cat 1</a>
<ol class="catsubhref">
<a href="/price/cat1/1/">Page 1</a>
<a href="/price/cat1/2/">Page 2</a>
<a href="/price/cat1/3/">Page 3</a>
</ol>
</li>
<li class="catsub" onclick="shouNone(this);" ondblclick="location.href='http://site.com/cat2.html'">
<a href="javascript:void(0)">Cat 2</a>
<ol class="catsubhref">
<a href="/price/cat2/1/">Page 1</a>
<a href="/price/cat2/2/">Page 2</a>
<a href="/price/cat2/3/">Page 3</a>
</ol>
</li>
How to implement javascript?
Thanks!