为什么这一系列的Jquery / Google API请求有效? [英] Why did this sequence of Jquery/Google API requests work?
本文介绍了为什么这一系列的Jquery / Google API请求有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在制作ajax,jquery,jquery ui,css等更多请求。虽然注意到谷歌API的位置 - 不知道为什么这个工作。
I'm making ajax, jquery, jquery ui, css, and more requests. Though notice the position of the google api - no idea why this worked.
<head>
<link rel="stylesheet" type="text/css" href="CSS/nudgeme.css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<link href='http://fonts.googleapis.com/css?family=Cabin:400,600' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="CSS/nudgeme.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script type="text/javascript" src='js/nudgeme.js'></script>
</head>
出于某种原因,当我移动google api请求时, p>
And for some reason, when I move the google api request down, it failed...
<head>
<link rel="stylesheet" type="text/css" href="CSS/nudgeme.css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<link href='http://fonts.googleapis.com/css?family=Cabin:400,600' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="CSS/nudgeme.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script type="text/javascript" src='js/nudgeme.js'></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
</head>
推荐答案
因为您将jQuery UI库添加到jQuery 1.9中,但随后您将jQuery更改为版本1.10,因此当您使用jQuery或$时,它将无法访问jQuery UI
Because you are adding jQuery UI library to jQuery 1.9, but then you are changing the jQuery to version 1.10 so when you use jQuery or $ it will not have access to jQuery UI
这篇关于为什么这一系列的Jquery / Google API请求有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文