admin管理员组文章数量:1406453
First off - yes - jQuery is being loaded before the validate plugin or any other js files.
Getting 'jQuery' is undefined - jquery.validate-1.8.1.min.js line 13 character 1 in IE8. FF, Chrome & Safari all validate the form perfectly fine.
<title>app title</title>
<script src=".7.2.min.js"></script>
<script src="path_to_file/jquery.validate-1.8.1.min.js"></script>
// CSS and other scripts are here //
</head>
<body>
The above is included from a mon header file. I have my actual validate rules on the page itself in a different script block (but I've also tried it in the header file under the jquery and validate script blocks - no dice on IE8.
If I keep plowing through the IE8 debugger, anytime you hit:
$(document).ready(function() {....
IE throws an error to the debugger about "Object expected" and points to '$'
First off - yes - jQuery is being loaded before the validate plugin or any other js files.
Getting 'jQuery' is undefined - jquery.validate-1.8.1.min.js line 13 character 1 in IE8. FF, Chrome & Safari all validate the form perfectly fine.
<title>app title</title>
<script src="http://ajax.aspnetcdn./ajax/jQuery/jquery-1.7.2.min.js"></script>
<script src="path_to_file/jquery.validate-1.8.1.min.js"></script>
// CSS and other scripts are here //
</head>
<body>
The above is included from a mon header file. I have my actual validate rules on the page itself in a different script block (but I've also tried it in the header file under the jquery and validate script blocks - no dice on IE8.
If I keep plowing through the IE8 debugger, anytime you hit:
$(document).ready(function() {....
IE throws an error to the debugger about "Object expected" and points to '$'
Share asked Sep 7, 2012 at 18:46 SteveSteve 3,1053 gold badges29 silver badges48 bronze badges 3- do you get the same error if you ment out the reference to jquery-1.7.2.min.js? – karthikr Commented Sep 7, 2012 at 18:49
- What are "the other scripts"? Are you loading a different library, such as MooTools? – Nix Commented Sep 7, 2012 at 18:50
- 1 This error normally stems from loading more than 1 JQuery library. – Brant Commented Sep 7, 2012 at 18:51
2 Answers
Reset to default 2Try letting google host the script instead, also it is better to specify the MIME type 'text/javascript' when including the script.
<script src="http://ajax.googleapis./ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"></script>
I found the error - the calls to CDN were http:// and needed to be https://. Even though IE asked if I wanted to load the potentially unsafe content and I said yes, it still never actually loaded the jQuery. Morale of the story - don't believe IE...
本文标签: javascriptjquery validate 181 quotjQueryquot is undefined error IE8Stack Overflow
版权声明:本文标题:javascript - jquery validate 1.8.1 "jQuery" is undefined error IE8 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745015657a2637823.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论