javascript - Show div instead with .hover or .mouseover ASP.NET -
i have image , on mouse hover want add description box or smthing that.
$(document).ready(function(){ $(".desc").hover(function(){ $(this).show(".abc"); }); }); </script>
.desc div picture is, .abc div description is.
.abc on page load has hidden
help ?
edit ::
i solve way
$('.desc').on({ mouseover: function() { $(this).find('span').fadein(200); }, mouseout: function() { $(this).find('span').stop().fadeout(200); }, })
where span <span class="d-none"> <asp:label id="label1" runat="server" text='<%# eval("description") %>' /> </span>
and span css display:none;
thank again helping me
you need select div want show. done following line $(".abc").show();
. code below should work.
$(document).ready(function(){ $(".desc").hover(function(){ $(".abc").show(); }); });
side note: this
keyword inside callback function .hover
event refers element(s) triggered upon. in case, element matches $(".desc")
.
Comments
Post a Comment