为什么这段代码不能让Sly工作?对不起,这是我的第一次。我看了一下文档然后跟着它,但它没有用。有什么遗失的吗? 我是Sars by darsain的新人。请帮我用SLY
<html>
<head>
<style>
* {padding: 0; margin: 0;}
.frame {
height: 100px;
border: 1px solid silver;
width: 100%;
}
.slidee {
float: left;
width: 100%;
}
.scrollbar { width: 100%; height: 10px; }
.scrollbar .handle {
width: 100px; /* overriden if dynamicHandle: 1 */
height: 100%;
background: #222;
}
</style>
<script src="jquery.js"></script>
<script src="sly.min.js"></sript>
<script>
$(document).ready(function(){
var sly = new Sly('.frame');
sly.init();
});
</script>
</head>
<body>
<div class="scrollbar">
<div class="handle"></div>
</div>
<div class="frame" id="oneperframe">
<div class="slidee">
<h2>This is a heading</h2>
<p>This is a paragraph</p>
</div>
<div class="slidee">
<h2>This is a heading</h2>
<p>This is a paragraph</p>
</div>
<div class="slidee">
<h2>This is a heading</h2>
<p>This is a paragraph</p>
</div>
</div>
</body>
答案 0 :(得分:0)
尝试使用
<script src="http://darsa.in/sly/examples/js/vendor/plugins.js"></script>
在jquery.js之后
或者你在这里犯了错误
<script src="sly.min.js"></sript>
必须是
<script src="sly.min.js"></script>
:P