[英]Simple swipe gallery with jQTouch javascript iphone / ipad
What I wish to achieve is have a simple gallery of images which the user can swipe through using jQTouch ( http://jqtouch.com ) 我希望实现的是一个简单的图像库,用户可以使用jQTouch( http://jqtouch.com )轻扫图像
<div id="container">
<img src="1.gif">
<img src="2.gif">
<img src="3.gif">
</div>
The images are quite long, for example 200px in width each. 图像很长,例如每个宽度为200像素。 The container itself is 300px wide with hidden overflow.
容器本身宽300px,有隐藏溢出。
What I wish to happen is when the user swipes the galley container, it drags the images to the left/right. 我希望发生的是当用户滑动厨房容器时,它将图像向左/向右拖动。
So far I have set up the container to receive swipe events and which direction it is in, however to be honest I have completely no idea where to go on from there. 到目前为止,我已经设置了容器以接收滑动事件以及它所处的方向,但是说实话,我完全不知道从那里继续前进。
Any advice appreciated. 任何建议表示赞赏
Have you come across this demo ? 你有没遇到这个演示 ?
"Photo Gallery" and "Photo Gallery 2" may be what you want. “照片库”和“照片库2”可能就是您想要的。 And if you just want to have photos and some captions, it should be fairly simple to setup:
如果您只想拥有照片和一些字幕,设置应该相当简单:
jQT.generateGallery("pageID",
[
{src:"http://www.site.com/somepic.jpg"},
{src:"pic1.jpg",caption:"Test Image 1"}
],
{defaultIndex:1}
);
You'll need the the jQT photo extension: jqt.photo.js
and jqt.photo.css
. 你需要jQT照片扩展名:
jqt.photo.js
和jqt.photo.css
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.