jquery - Image over image hover -
i have div, , div, both have images set them ex:
<div id="image"></div> <div id="btnprev"></div> the image underneath button prev. - i'm trying trigger hover on image, , fade in btnprev, when mouse goes on btnprev fades out due leaving div id 'image'.
is there way 'append these together', cannot place btnprev inside 'image'.
i cannot place btnprev inside 'image'. however, can create class.
ex :
<div id="image" class="hoverdiv"></div> <div id="btnprev" class="hoverdiv"></div> and in jquery can :
$('.hoverdiv').on("hover", function() { //do stuff }); however, think if put them 1 containing div work better because btnprev won't showing if have :
<div id="imagecontainer"> <div id="image" class="hoverdiv"></div> <div id="btnprev" class="hoverdiv"></div> </div> and jquery function should :
$('#imagecontainer').on("hover", function(){ //do stuff });
Comments
Post a Comment