RayofHope
RayofHope

Reputation: 1187

PhoneGap: How to use swipe gesture for images in html to make image gallery?

How to display image gallery when user swipe from left or right the images is changed accordingly?

is this possible with Phonegap to make iPad application.

Can any one give me hint for this??

Upvotes: 2

Views: 3478

Answers (2)

codemonkey
codemonkey

Reputation: 5267

You can use one the many Carousel/Slide galleries that are out there. I have used the Carousel from Bootstrap http://twitter.github.com/bootstrap/javascript.html#carousel and it is good.

You can then combine this with jQuery Mobile events which @vikky has mentioned. This provides swipeleft and swiperight which you can use to trigger the next/previous methods on the Carousel you choose. http://jquerymobile.com/demos/1.1.0/docs/api/events.html

Upvotes: 0

jiten
jiten

Reputation: 5264

<script>
$("ul").delegate("li", "swiperight", function() {
 // The user has swiped to the right on a list view item. Show an edit menu.
//$(this).find(".menu-edit").show();//change here according to your need.
})
</script>

Upvotes: 1

Related Questions