开发者

JQuery setInterval doesn't start at all

I'm trying to run a function every second but no matter what I have tried it never happens. I have even simplified t开发者_如何学编程he code to

jQuery(function(){ setInterval(function() { alert('interval'); }, 300); })

but it just doesnt do anything. I'm not getting any errors and jquery is definitely installed properly


jquery is definitely installed properly

Are you trying to say that you have referenced the jquery file from the correct path, something like

<script src="padth to jquery.js" type="text/javascript"></script>


Thanks for the suggestion guys, the code was correct and jQuery was installed. For some reason restarting my webserver corrected the problem, no idea what happened there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜