我希望在存在两个类之一时激活鼠标悬停。现在我有一个名为第一场比赛的课程。
$(document).on('mouseover', 'a.first-game', function(e){
现在我想要两节课。我试过这样的事情:
$(document).on('mouseover', 'a.first-game' || 'a.second-game', function(e){
非常感谢任何帮助
答案 0 :(得分:1)
您需要使用multiple selector,其中每个选择器由,
$(document).on('mouseover', 'a.first-game, a.second-game', function(e){
演示:Fiddle