image - jQuery Show/Hide doing something strange, hiding wrong element -
so, i've written snippet of jquery makes sense me, it's doing had not intended do. on navigation bar, on rollover, want little image appear underneath using show/hide functions. so, when hover on "home", example, want image.png appear beneath it. here's jquery.
$("#home").hover( function () { $(this).show(".mustache_one"); }, function () { $(this).hide(".mustache_one"); } );
now it's doing when on hover, nothing, , when removing mouse "home", moving entire div contains navbar left hide "home" link. meanwhile, image.png never shows up.
you cannot pass element id/class show
or hide
. besides, $this
refer #home
, hence it'll try show/hide home element. don't know markup, how js should look.
$("#home").hover( function () { $('.mustache_one').show('slow'); }, function () { $('.mustache_one').hide('slow'); } );
Comments
Post a Comment