使用 jQTouch javascript iphone / ipad 进行简单的滑动图库
我希望实现的是拥有一个简单的图像库,用户可以使用 jQTouch 进行滑动浏览( http://jqtouch.com )
<div id="container">
<img src="1.gif">
<img src="2.gif">
<img src="3.gif">
</div>
图片相当长,例如每张宽度为 200px。容器本身宽 300 像素,具有隐藏的溢出。
我希望发生的是,当用户滑动厨房容器时,它将图像向左/右拖动。
到目前为止,我已经设置了容器来接收滑动事件及其方向,但是说实话,我完全不知道从哪里开始。
任何建议表示赞赏。
What I wish to achieve is have a simple gallery of images which the user can swipe through using 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. The container itself is 300px wide with hidden overflow.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您遇到过这个演示吗?
“照片库”和“照片库2”可能就是您想要的。如果您只想拥有照片和一些标题,那么设置应该相当简单:
您需要 jQT 照片扩展名:
jqt.photo.js
和jqt.photo。 css
.Have you come across this demo?
"Photo Gallery" and "Photo Gallery 2" may be what you want. And if you just want to have photos and some captions, it should be fairly simple to setup:
You'll need the the jQT photo extension:
jqt.photo.js
andjqt.photo.css
.看看我刚刚发布的这款轻量级移动滑块。 Swipe 或许可以解决您的问题: )
Check out this lightweight mobile slider I just released. Swipe might be able to solve your problem :)