jQuery点击功能工作但是实时点击不工作 [英] jQuery click function work but live click not work
本文介绍了jQuery点击功能工作但是实时点击不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在jQuery中运行一个实时点击函数,发现它不工作像
i am trying to run a live click function in jQuery and found that's not work like
$(function () {
$("#elem #check").click(function () {
alert('goaa');
});
$("#elem #check").live("click", function () {
alert('fo');
});
});
页面加载,没有来自ajax.when我试图运行,我发现[点击]第一是工作,第二不是[现场点击]。
the page load and nothing come from ajax.when i trying to run that i found that [click] first is work and second not [live click].
点击的原因是什么,工作和生活不工作: -
what is the reason of click are work and live not worked.:-
这是我的错,我试图运行它在jQuery UI选项卡,所以不工作。
Well it is my fault that i am trying to run it on jQuery UI tab so that's not worked.
推荐答案
p>不知道问题是什么。如您在现场演示中所看到的,此代码运行正常。
No idea what the problem is. As you can see in the following live demonstration this code works perfectly fine.
这篇关于jQuery点击功能工作但是实时点击不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文