using on() with hover - jQuery

后端 未结 7 1206
感情败类
感情败类 2021-01-26 05:51

This is what I have:

$(\'#blah\').hover(function(){
    $(\'etc\').show();
}, function(){
    $(\'etc\').hide();
});

This works just fine, now

相关标签:
7条回答
  • 2021-01-26 06:16

    It's because hover is not really a browser event, in fact its just a shorthand for calling

     $(selector).mouseenter(handlerIn).mouseleave(handlerOut);
    

    Using with the .on('hover') form have been deprecated as of version 1.8.

    0 讨论(0)
提交回复
热议问题