javascript - Display div on mouse hover -
i have link id="show"
in header , div id="display"
in footer. want display div id="display"
when mouse hover on id="show"
in header area , div in footer area.
html code:
<header> <a href="#" id="show"><span> show div </span></a> </header> <---- other content --> <footer> <div id="display"> --- content --- </div> </footer>
try : can use .hover()
function shown below. pass comma seprated functions it. first function call when mouseover
, second mouseleave
event.
$(function(){ $('#show').hover(function(){ $('#display').show(); },function(){ $('#display').hide(); }); }):
Comments
Post a Comment