jquery准备函数没有得到hit内部函数 [英] jquery ready function not getting hit inside function
本文介绍了jquery准备函数没有得到hit内部函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我的jquery准备好的函数没有得到调用。我把一个断点在行,它打它,但没有内部的函数是命中。这是从coffeescript生成的js。
So my jquery ready function isn't getting called. I put a breakpoint at the line and it hits it, but nothing inside the function is hit. Here's the js, which was generated from coffeescript.
(function() {
jQuery(function() {
return alert('working');
});
}).call(this);
因此jQuery行的断点被命中,但不是警报。任何想法?
So the breakpoint at the jQuery line gets hit, but not the alert. Any ideas?
推荐答案
就我可以告诉它的工作:
As far as I can tell its working:
http://jsfiddle.net/thundercracker/dbdyC/
编辑:
也许你可以尝试让函数自动执行,因为它不工作在你的身边?
maybe you could try to make the function self-executing since its not working on your end?
(function() {
jQuery((function() {
return alert('working');
})());
}).call(this);
这篇关于jquery准备函数没有得到hit内部函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文