
Originally Posted by
tommuseth
PS I've stripped the code right back to its original form, with the divs included. If anyone can show me from that point how they'd rearrange things, that would be awesome.
Fix the invalid HTML structure. That's the base cause of the problem.
Code:
<ul id="navV">
<li><span>Login area for site members</span></li>
<div class="accImage" id="loginBackground">
</div>
...
</ul>
Currently you have LI elements and DIV elements as children of the UL element. Only LI elements are allowed as direct children. That means anything else in the UL element must be contained within the LI element.
Code:
<ul id="navV">
<li><span>Login area for site members</span>
<div class="accImage" id="loginBackground">
</div>
</li>
</ul>
Now that you have valid HTML code you can move on to the scripting. The span event doesn't need to go to the parent anymore
Code:
$(this).parent().next().slideDown();
And all that remains is to tidy up the CSS presentation, for example, not having the LI as only 60 pixels high
Code:
#navV li {
width: 200px;
height: 60px;
...
}
Bookmarks