【发布时间】:2011-11-29 08:25:51
【问题描述】:
我知道我已经多次发布了类似的问题,但我真的很困惑为什么不工作。
这是我最新版本的代码:
HTML
<html>
<head>
<script type="text/javascript" src="jquery-1.6.4.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="script.js"></script>
<style type="text/css">
#name{
background-color: #FFFFF2;
width: 100px;
}
</style>
</head>
<body>
<input type="button" id="bgcolor" value="Change color"/>
<div id="name">
Abder-Rahman
</div>
</body>
</html>
script.js
$("#bgcolor").click(function(){
$("#name").animate(
{backgroundColor: '#8B008B'},
"fast");}
);
我想注意到我有一个名为:jquery-ui-1.8.16.custom 的文件夹,这是我放置这些文件的位置。而且,我已经引用了 jquery-1.6.4,js,如上所示,我也将它放在同一个文件夹中, 除了引用当前文件夹的js 文件夹中的jquery-ui-1.8.16.custom.min.js。
我在这里做错了什么?这不就是引用jQuery和jQueryUI的方式吗?
编辑
使用的浏览器: Mozilla Firefox 6.0.2
文件夹结构: jquery-ui-1.8.16.custom/abc.html jquery-ui-1.8.16.custom/script.js jquery-ui-1.8.16.custom/jquery-1.6.4.js jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js
谢谢。
【问题讨论】:
-
不要打开连续的问题。如果您想添加一些内容,请编辑您的前一个。此外,如果他们的回答对您不起作用,请与回答您的人沟通,询问进一步的说明。不要在没有首先尽力解决第一个问题的情况下就提出新问题。
标签: jquery jquery-ui background-color