简体   繁体   English

jQuery代码在另一个文件中

[英]JQuery code in another file

before this I wrote all jquery-code into main fail. 在此之前,我将所有jquery-code写入main失败。 Now I want to move it into another js-file. 现在,我想将其移动到另一个js文件中。 The problem is that it doesn't want work correctly. 问题是它不希望正常工作。 Here is an error by FireBug: 这是FireBug的错误:

$ is not defined $未定义

$(document).ready(\\n $ {document).ready(\\ n

So, as I understand, I have to initialize $-var... But how? 因此,据我了解,我必须初始化$ -var ...但是如何?

Thanks. 谢谢。

在使用jQuery的文件之前包含jQuery。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM