jquery - Cloud Carousel and iPad/iPhone touch events -


really love carousel: http://www.professorcloud.com/mainsite/carousel.htm

works how need demo apart need add touch/wipe events ios , android.

basically if user wipes (is correct terminology?) left or right, carousel moves in direction, if press left or right button.

i looked using plugin: http://plugins.jquery.com/project/touchwipe-iphone-ipad-wipe-gesture

and tried tweak (hack) carousel plugin listen these events

$(container).bind('touchwipe',this,function(event){    wipeleft: function() { alert("left"); } }); 

but generates syntax error. don't know enough creating plugins know allowed here.

from can tell in plugin, scroll left/right functionality here

    // setup buttons.     $(options.buttonleft).bind('mouseup',this,function(event){         event.data.rotate(-1);           return false;     });     $(options.buttonright).bind('mouseup',this,function(event){                                                                  event.data.rotate(1);            return false;     });  

so suppose need hook these.

should use additional plugin create wipe events, or shall try official touch events?

thanks!

this code works me

    $(container).bind('swiperight', this, function(event, ui)     {         event.preventdefault();         event.data.rotate(-3);     });      $(container).bind('swipeleft', this, function(event, ui)     {         event.preventdefault();         event.data.rotate(3);     }); 

don't forget add jquery mobile @ http://jquerymobile.com/


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -