Response title
This is preview!




I have a page that allows users to use a swipe gesture to navigate the pages. I am able to get this working but I can not use the native jQM method, changePage. I can't use changePage because we generate URL's for the next page dynamically. Here is the working script:
$(function(){
$('#page_div').live('swiperight', function(event){
location.href='/<?= $this->nextSlideLink ?>';
});
$('#page_div').live('swipeleft', function(event){
location.href='/<?= $this->prevSlideLink ?>';
});
});
Now, the problem is that i'm not able to get the jQM transitions functioning because i'm not using changePage.
Normally you would do something like this, but not in this instance:
$('#page_div').live('swiperight', function(event){
$mobile.changePage('<?= $this->prevSlideLink ?>' {transition:'slide'});
});
Does anyone know how I can get the transitions working with location or an alternate way to get the changePage method to function??
Another thing might be to recall the script on each page change. Anything would be helpful.
© 2012 jQuery Foundation
Sponsored by
and others.
