I have a li with class ‘tab3’. There is jQuery elsewhere that when you hover on it it adds the class ‘selected’. I want to do something when this happens:
<li class='tab3 selected'>
<div class='showme'>Show this</div>
<div class='addattr'>Add attributes</div>
</li>
$('.tab3.selected').each(function() {
$('.showme').show();
$('.addattr').attr('style', 'position:relative; display:block');
});
You can accomplish this via css: