在Play Framework应用程序中未检测到jQuery [英] jQuery not detected in Play Framework application

查看:84
本文介绍了在Play Framework应用程序中未检测到jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在我的Play Framework应用程序上使用jQuery/jQuery UI.我已经包含了所有必要的样式表和js文件.该页面正确加载,但是Firebug错误控制台显示Jquery Undefined.我不明白这里出了什么问题.有什么想法吗?

I'm not able to use jQuery/jQuery UI on my Play Framework application. I have included all the necessary stylesheets and js files. The page loads properly but Firebug error console shows Jquery Undefined. I cannot understand what's wrong here. Any ideas?

推荐答案

实际上看起来像是语法错误.

Actually looks like a syntax error.

您是否使用此语法?

$(function() {
    // Code
});

此外,如果您尝试包含正在播放的文件,且该文件在出现错误时不存在,则播放将显示错误,并且不会启动应用程序.让我想,您使用jQuery的方式错误.

Plus if you try to include a file in play that does not exist if there is an error, play will display an error and not launch application. Makes me think, you are using jQuery the wrong way.

签出 jQuery文档,并确保这不是与 jQuery相关的问题.

Checkout jQuery documentation and make sure, this is not a jQuery related issue.

这篇关于在Play Framework应用程序中未检测到jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆