更新:根据以下有用的建议,我移动了 1.9.1。版本到顶部并取出1.4。没有更多错误,但 Sticky 仍然不起作用。
我正在使用此处(http://labs.anthonygarand.com/sticky)找到的 Sticky menu jquery 插件,这看起来很简单,但我似乎无法让它没有错误。
这是我的标题:
<head>
<meta charset="utf-8">
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="robots" content="" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Oxygen">
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/960.css" rel="stylesheet" type="text/css" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/example.css">
<style>
body {-webkit-font-smoothing: antialiased;font: normal 15px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;}
#slides {display: none;margin-top:36px;}
.slidesjs-container {width:1000px;height:252px;margin-bottom:-21px;}
#slides .slidesjs-navigation {margin-top:-17px;visibility: hidden;}
#slides .slidesjs-previous {margin-right: 5px;float: left;visibility: hidden;}
#slides .slidesjs-next {margin-right: 5px;float: left;visibility: hidden;}
.slidesjs-pagination {margin: 0px 6px 0;float: right;list-style: none;position:relative;z-index:1000;}
.slidesjs-pagination li {float: left;margin: 0 1px;}
.slidesjs-pagination li a {visibility:hidden;display: block;width: 14px;height: 0;padding-top: 14px;background-image: url(images/pagination.png);background-position: 0 0;float: left;overflow: hidden;}
.slidesjs-pagination li a.active,
.slidesjs-pagination li a:hover.active {background-position: 0 -14px}
.slidesjs-pagination li a:hover {background-position: 0 -28px}
#slides a:link,
#slides a:visited {color: #333}
#slides a:hover,
#slides a:active {color: #9e2020}
.navbar {overflow: hidden}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/smooth-scroll.js"></script>
<script type="text/javascript" src="js/jquery.sticky.js"></script>
<script type="text/javascript" src="cform.js"></script>
<script>
$(window).load(function(){
$("#header").sticky({ topSpacing: 0 });
});
</script>
</head>
我在体内也有这个来运行滑块:
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.slides.js"></script>
<script>
$(function(){
$("#slides").slidesjs({
play: {
active: true,
effect: "slide",
interval: 5000,
auto: true,
swap: true,
pauseOnHover: true,
restartDelay: 2500,
width:936,
height:247
}
});
});
</script>
谢谢!我是一个新的stackoverflow-er,喜欢这里的知识!