[英]Need help setting up a jQuery plugin “SpriteSpin”
Here is the plugin page: http://spritespin.ginie.eu/howto.html 这是插件页面: http : //spritespin.ginie.eu/howto.html
Here is my site: http://chronox.netai.net/ 这是我的网站: http : //chronox.netai.net/
Scroll down to the very bottom to see the issue. 向下滚动到最底端以查看问题。
I want that plugin inside the last section (the slider with arrows and the '360*'. 我希望该插件位于最后一部分(带有箭头和“ 360 *”的滑块)中。
I've followed the instructions. 我已经按照指示进行了。 But obviously it's not showing up.
但是显然没有出现。 Can someone take a look at the code and see if it's right?
有人可以看一下代码,看看是否正确吗?
<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>
you need to put your code in $( document ).ready(function() {});
您需要将代码放入
$( document ).ready(function() {});
updated 更新
you are missing spritespin.js
reference. 您缺少
spritespin.js
参考。
<script src='spritespin.js' type='text/javascrip' />
You need to include sprite js in your html. 您需要在HTML中包含Sprite JS。 You may insert it right after jquery.
您可以在jquery之后插入它。
<script src='jquery-1.4.2.js' type='text/javascript' />
<script src='spritespin.js' type='text/javascrip' />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.