I'm using the following code to swap <div>
contents. It functions properly with the exception of the mousein and mouseout behavior of the boxes, which shows the wrong one. The class name "flipped" has display set equal to none. Should I check state, use setTimeout() or another method to prevent this behavior?
The html
<div class="videobox">
<div class="unflipped">
<img src="videoprop.jpg">
<div class="desc_over">This is a description! Video Contains This!</div>
</div>
<div class="flipped">This what displays when flipped 1!</div>
</div>
The jQuery
$(".videobox").hover(function(){
$(this).children(".unflipped:first").fadeOut("fast",function(){
$(this).next(".flipped:first").fadeIn("fast");
});
},function(){
$(this).children(".flipped:first").fadeOut("fast",function(){
$(this).prev(".unflipped").fadeIn("fast");
});
});