Reputation: 1151
I would like to activate the mouseover when there one of the two classes present. Right now I have one class named first-game.
$(document).on('mouseover', 'a.first-game', function(e){
Now I want two classes. I tried something like this:
$(document).on('mouseover', 'a.first-game' || 'a.second-game', function(e){
Any help would be much appreciated
Upvotes: 0
Views: 45
Reputation: 388316
You need to use multiple selector where each selector is separated by ,
$(document).on('mouseover', 'a.first-game, a.second-game', function(e){
Demo: Fiddle
Upvotes: 1