.is(“:hover”) is broken as of jQuery 1.9 How to fix

后端 未结 3 1639
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 15:08

When doing $(...your selector here...).is(\":hover\"), jQuery prior to 1.9.1 gave correct answer, while jQuery 1.9.1 tells you this:

Erro

3条回答
  •  温柔的废话
    2020-12-05 15:45

    Assuming your selector is #myid, use $('#myid:hover') instead of using .is().

    If you are using $(this) or a variable, use myVar.filter(':hover').

提交回复
热议问题