I want to apply a hover fade to multiple elements whose ID is #front-overlay. This code currently works only for the first element with that ID. Thanks for your help.
$("#front-overlay").mouseenter(function() {
$(this).fadeTo("fast", 0.8);
$(this).css("color","#fff");
});
$("#front-overlay").mouseleave(function() {
$(this).fadeTo("fast", 0.3);
You cannot have multiple items with the same ID.
If you do, it won’t work properly.
Instead, use classes.