我想在我的html文件中添加Jquery滑块,但我遇到的问题是某些jquery函数没有被执行。
这是我的源代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Aluminum and Glass</title>
<link href="css/Style.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery- ui.min.js"></script>
<script type="text/javascript">
function slider()
{
$(".slider#1").show("fade",5000);
}
</script>
<body>
<div id="wapper">
<div id="logo">
<img src="images/Logo.2cdr.jpg" width="948px" height="150" />
</div><!--end of logo -->
</div>
</body>
答案 0 :(得分:2)
src值中有空格
这一行:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery- ui.min.js"></script>
替换为这一行:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>