donderdag 25 augustus 2011

Double swipe event firing in JQueryMobile

I was having some trouble with swipe events firing twice in JQueryMobile

e.bind('swipeleft swiperight',function(event){
//....
};

changing this to a live() fixed it

e.live('swipeleft swiperight',function(event){
//....
};

the bind event will only attach to elements already rendered in the dom, so somehow i guess it gets bound twice

Geen opmerkingen: