I am trying to select a group of elements with a similar class. and then filter the selection by the element id. Is there a better way to go about this?
Then using that same id, I want to do something to a element set up with the same show entitcal class
$('ElementClass-1').attr('ElementId-1');
$(this).hover(function(){
..do stuff
});
});
<a class="ElementClass-1" id="ElementId-1">hover me</a>
<a class="ElementClass-1" id="ElementId-2">hover me</a>
<a class="ElementClass-1" id="ElementId-3">hover me</a>
<div style="display:none; class="ElementId-1">show me</div>
<div style="display:none; class="ElementId-2">show me</div>
<div style="display:none; class="ElementId-3">show me</div>
Try something like below,