In addition to an accordion-related problem in IE (see http://www.sitepoint.com/forums/javascript-15/jquery-accordion-click-not-working-ie-752325.html), I’m having a headache regarding drop down menus.
Again, this is only in IE (version 8) - every other browser in the known galaxy responds well to the JS and the HTML setup.
The idea is there’s a horizontal nav bar of five ‘blocks’, each with a heading. Hover over the heading and the ‘block’ (actually an <li>) extends to accommodate a small sentence underneath with a link. Hover off, and the block shrinks back to its original form, with the link hidden.
All good in FF, Opera, Safari, Chrome. In IE, though, the <li> block doesn’t extend - the link is shown beneath it, but it’s outside its frame and looks awful.
Here’s the HTML:
<ul id=“navH”>
<li><span>Home</span><a href=“index_link.php”>Click here to return to the index page</a></li>
<li><span>About us</span><a href=“about_us.php”>Find out about the website members and their details</a></li>
<li><span>Contact us</span><a href=“contact.php”>Interested in health psychology? Drop us a message</a></li>
<li><span>Careers</span><a href=“careers.php”>Options for careers and study in health psychology</a></li>
<li><span>Links</span><a href=“links.php”>A list of links to relevant sites that might be of interest</a></li>
</ul>
And here’s the jQuery:
$(‘#navH li a’).css({
display: “none”,
});
$(‘#navH li’).hoverIntent(function() {
$(this)
.animate({height: ‘+=35px’}, 300)
.find(‘a’)
.fadeIn()
.stop(true, true)
}, function() {
$(this)
.animate({height: ‘-=35px’}, 300)
.find(‘a’)
.stop(true,true)
.fadeOut(‘fast’);
});
Thanks in advance guys.