Simple scroll gallery with jQTouch javascript iphone / ipad

What I want to achieve is a simple image gallery that the user can scroll through using jQTouch ( http://jqtouch.com )

<div id="container">
<img src="1.gif">
<img src="2.gif">
<img src="3.gif">
</div>

Images are quite long, for example, 200 pixels wide. The container itself has a width of 300 pixels with hidden overflow.

What I want to do is when the user goes through the galley container, he drags the images left / right.

So far, I have configured the container to receive napkin events and in what direction it is, however, to be honest, I absolutely do not know where to go next.

Any advice is appreciated.

+3
2

?

"" " 2" , . , :

jQT.generateGallery("pageID",
    [
    {src:"http://www.site.com/somepic.jpg"},
    {src:"pic1.jpg",caption:"Test Image 1"}
    ],
    {defaultIndex:1}
);

jQT: jqt.photo.js jqt.photo.css.

+8

, . Swipe :)

+6

Source: https://habr.com/ru/post/1761209/


All Articles