jquery 1.3.2- using .click()

问题描述 投票:0回答:2
.hover()

工作一样函数。 this工作正常:

    $(document).ready(function() {
        $("#alert_button").hover(function(){
            alert("The monitor has been notified - please wait in your room and they will be by shortly");
        });
    });
但这不是:

$(document).ready(function() { $("#alert_button").click(function(){ alert("The monitor has been notified - please wait in your room and they will be by shortly"); }); });

DID1.3.2不支持
.click()

?如果没有,有其他事件处理程序可以使用?

	
在任何情况下都可以工作...

demo



trather,
javascript jquery event-handling click jquery-events
2个回答
0
投票
将在

chrome

中无法使用,例如
.hover()actiondemo

如果您对上述错误还不错,那么您的错误就在其他地方 打开Firebug或任何开发人员控制台,看看您是否还有其他JS错误。


工作,您的代码可能面临一些冲突。请检查您的浏览器控制台是否有错误。
    
将您的jQuery置于2.03,然后更改为.on('click',函数...
您的版本很旧,并且具有许多不弃用的代码。
    

<button>



0
投票
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.