工作,我有以下代碼懸停不使用jQuery 1.9
HTML:
<div id="test">
<p id="hello">HELLO</p>
<p id="no-hello">NO HELLO</p>
</div>
的jQuery:
$('#test').click(function() {
alert($('#hello').is(':hover'));
if ($('#hello').is(':hover')) {
alert('hello');
}
});
我已經使用jQuery 1.6已經和它工作得很好。但現在由於某種原因,1.9被用來代替,並且這已停止工作。 我試圖在網上找到解決方案,但沒有得到任何有關這方面的提示。
Thanx All。
請看看現在 – 2013-03-20 14:37:18
「的jQuery只支持實際選擇的DOM元素選擇 - 一切被忽略。」 [從這些舊文檔](http://docs.jquery.com/API/1.1.2/DOM/Traversing/Selectors)。在較新的文檔中,甚至沒有提及。 – couzzi 2013-03-20 14:37:58
查看您的控制檯 - 它會爲您節省大量時間: '未捕獲的錯誤:語法錯誤,無法識別的表達式:不支持的pseudo:hover' – couzzi 2013-03-20 14:41:33