Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery mobile carousel

i need to display a page with a moving carousel, on slide -- not changing page but showing item in carousel on slide only (w/o page reload). in the carousel the items are then linked to a jqm dialog. how can i do this w/o iframe or embed. this needs to work on swipe though

like image 983
daily-learner Avatar asked Mar 30 '11 22:03

daily-learner


2 Answers

Have a look to Ariel Flesler's lib LocalScroll :

http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html

You can see it in use here : http://nancysellers.net/

like image 26
Thomas Guillory Avatar answered Oct 12 '22 20:10

Thomas Guillory


Check out http://swipejs.com/

Pros:

  • Keeps it simple (markup convention)
  • Uses CSS-Transitions (very smooth on iOS)
  • You can swipe through arbitrary markup
  • no other libraries required; pure JS

License: GPL or MIT

The link to your dialog can be done by simply bind a tap handler to the swiping elements that generates a dynamic dialog like this:

var dialog = jQuery('<div data-role="dialog"> <div data-role="content"> <h1>A Dialog</h1> </div> </div>');
dialog.appendTo(jQuery.mobile.pageContainer);
jQuery.mobile.changePage(dialog);
like image 80
hgross Avatar answered Oct 12 '22 20:10

hgross