Jquery hover get Id issue
Hi I have an img and when I hover over it I want it to unhide a div,
however It won't work. Here is my attempt.
$("img").hover(
function () {
var currentID = $(this).attr('id');
$('.'+currentID).show();
},
function () {
var currentID = $(this).attr('id');
$('.'+currentID).hide();
}
);
Here is the HTML
//intially hidden via display:none
<div class="Alligator sinensis"
style="display:none;border:solid;float:right;">
//this is the image
<img id="Alligator sinensis" class="circular resultss imgs"
src="http://media.eol.org/content/2013/02/20/13/27869_orig.jpg">
No comments:
Post a Comment