I want to loop through JQUERY based on a count that I would input. Specifically if I enter this for entry 0, this code works:
$(document).ready(function()
{
$('.0').mouseenter(function()
{
$('.hideme0').fadeIn('slow');
});
$('.0').mouseleave(function()
{
$('.hideme0').fadeOut('slow');
});
});
I now wish to replace ('.0') Which is dynamic CSS class with the name 0 with a loop counter for example
for (var n = 0; n < 3; ++ n)
{
$(**n**).mouseenter(function()
{
$('.hideme**n**').fadeIn('slow');
});
$(**n**).mouseleave(function()
{
$('.hideme**n**').fadeOut('slow');
});
}
Any ideas on how to do this with jQuery? I can't find info in the API or with a Google search for instructions.
I hope this is clear, and you understand what I'm trying to do.