jquery - DIV on top of DIV on hover without blinking -
i trying achieve hover effect in example http://usepanda.com/app/ want able add info on div once hovered did
here tried: http://jsfiddle.net/ynukx/584/
<div class="hover"></div> <div class="fade" style="display:none"></div>
css:
.hover{ width:40px; height:40px; background:yellow; } .fade{ position:absolute; top:0px; width:40px; height:40px; background:black; }
jquery:
$(document).ready(function(){ $("div.hover").hover( function () { $("div.fade").fadein(); }, function () { $("div.fade").fadeout(); } ); });
you can try below code:
$(document).ready(function(){ $("div.hover").mouseover( function () { $("div.fade").fadein(); }); $("div.fade").mouseout( function () { $(this).fadeout(); } ); });
Comments
Post a Comment