jquery 'this' confusion
- by Elliott
Hi I have the code below, once the first (only) item in the menu is hovered over, the subtext should appear. I have used 'this' as I thought it should find the class with the "li" and then slideDown. This doesnt seem to work, although 'this' works for when you remove the hover, as it slides up (top part not the subtext).
<body>
<script type="text/javascript">
$(document).ready(function()
{
$('li').hover(function()
{
$(this).stop(true, true).slideDown();
$(this).slideDown("slow");
},
function ()
{
$(this).slideUp("fast");
}
);
});
</script>
<ul>
<li class="hover">
<p><a href="#">Hover</a></p>
<p class="subtext">Show More</p>
</li>
</ul>
Any advice?
Thanks