这是插件页面: http://spritespin.ginie.eu/howto.html
这是我的网站: http://chronox.netai.net/
向下滚动到最底层以查看问题。
我希望该插件位于最后一部分(带箭头的滑块和'360 *'。
我按照说明操作。但显然它没有出现。有人可以看看代码,看看它是否正确?
<script type="text/javascript">
$(".threesixty-gold").spritespin({
// path to the source images.
source: [
"assets/img/threesixty/gold/gold0000.jpg",
"assets/img/threesixty/gold/gold0001.jpg",
"assets/img/threesixty/gold/gold0002.jpg",
"assets/img/threesixty/gold/gold0003.jpg",
"assets/img/threesixty/gold/gold0004.jpg",
"assets/img/threesixty/gold/gold0005.jpg",
"assets/img/threesixty/gold/gold0006.jpg",
"assets/img/threesixty/gold/gold0007.jpg",
"assets/img/threesixty/gold/gold0008.jpg",
"assets/img/threesixty/gold/gold0009.jpg",
"assets/img/threesixty/gold/gold0010.jpg",
"assets/img/threesixty/gold/gold0011.jpg",
"assets/img/threesixty/gold/gold0012.jpg",
"assets/img/threesixty/gold/gold0012.jpg",
"assets/img/threesixty/gold/gold0013.jpg",
"assets/img/threesixty/gold/gold0014.jpg",
"assets/img/threesixty/gold/gold0015.jpg",
"assets/img/threesixty/gold/gold0016.jpg",
"assets/img/threesixty/gold/gold0017.jpg",
"assets/img/threesixty/gold/gold0018.jpg",
"assets/img/threesixty/gold/gold0019.jpg",
"assets/img/threesixty/gold/gold0020.jpg",
],
width : 1900, // width in pixels of the window/frame
height : 930, // height in pixels of the window/frame
});
</script>
答案 0 :(得分:2)
您需要将代码放在 $( document ).ready(function() {});
中
的更新强>
您缺少spritespin.js
参考。
<script src='spritespin.js' type='text/javascrip' />
答案 1 :(得分:0)
你需要在你的html中包含sprite js。你可以在jquery之后插入它。
<script src='jquery-1.4.2.js' type='text/javascript' />
<script src='spritespin.js' type='text/javascrip' />