Ok, so what I'm trying to do is:
When I hover over a <li> in an image carousel I made, I want an information panel (".label") to fill with information from a <p> within that <li>. Here's the basic structure of the HTML:
And here's the jQuery I've written:HTML Code:<div class="gallery">
<ul>
<li>
<img ... />
<p>Information</p>
</li>
<!-- Repeat li -->
</ul>
<div class="label"></div>
</div>
Now, everything works just fine, but only the first time you hover over each <li>. After that, it only fades in the <div>, but there's no HTML. I suspect it has to do with the use of "this" in the 3rd line, but I'm not sure and if it does I have no idea how else to do it.Code:$('.gallery ul > li').hover(
function(){
$('.label').html($(this).children('p')).fadeIn('fast');
},
function(){
$('.label').fadeOut('fast');
}
);