I have multiple objects with data-rel values and for only some of them I would like to be able to, let's say, change to color of the content to red like so:
HTML
<p data-rel="1">1</p>
<p data-rel="2">2</p>
<p data-rel="3">3</p>
<p data-rel="4">4</p>
SCRIPT
$("[data-rel='1'], [data-rel='3']").hover(function (){
$( this ).css({
'color': 'red'
});
});
This works but it can get pretty boring to write for each value [data-rel='3']
so I was wondering, is there a way to do this something like: [data-rel='1, 3']
instead of [data-rel='1'], [data-rel='3']
?