Javascript: function expand(div) { var expand=document.getElementById(div).style; if (expand.display=="none") {expand.display="block";} else {expand.display="none";} } Code (markup): HTML <ul> <li><a href="javascript:expand('seasonal')">Holiday Updates</a></li> <li id="seasonal"> <ul> <li><a href="#">1</a></li> <li><a href="#">2</a></li> </ul> </li> <li><a href="javascript:expand('volunteer')">Volunteer</a></li> <li id="volunteer"> <ul> <li><a href="#">1</a></li> <li><a href="#">2</a></li> </ul> </li> </ul> Code (markup): Its not expanding it or doing anything, I am getting an "object expected" error. Please help, it is greatly appreciated. Rep for sure
Hi, I tried your code and it works fine on IE, FF. Clean your cache, or the error is some other code on the page