jquery - show/hide divs on hover -



jquery - show/hide divs on hover -

i cannot div show/hide upon hovering on element. apply image map, made simple fiddle functionality. doing wrong?

<script> $('#a1').hover(function () { $('#t1').toggleclass("hidden"); }); </script> <style> .hidden {display:none;} </style> <div id="a1">test a1</div> <div id="t1" class="hidden">timeline 1</div>

http://jsfiddle.net/4p7vlogd/

html

<div id="a1">test a1</div> <div id="t1" class="hidden">timeline 1</div>

jquery

$(document).ready(function(){ $('#a1').hover(function () { $('#t1').toggleclass("hidden"); }); });

css

.hidden { display:none; }

make sure include jquery. here's forked fiddle: http://jsfiddle.net/2eyzce7h/

if you're having issues functionality, consider using mouseenter() , mouseleave() instead of .hover().

jquery show-hide

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -