Im working on a jquery mobile project. I have two html pages. From index.html i have a swipeleft event to page.html and it works fine. From page.html i want to swiperight so i come back to index.html but that won't work.
The code works fine if i swipe between internal pages inside a single document, but not between html pages. And i need to use several html pages.
Has anyone got this to work? Would be grateful for answers.
This i my swipe code in my index.html page:
<script>
$(document).ready(function() {
$("#main").bind('swipeleft',function(event, ui){
$.mobile.changePage("page.html", "slide");
})
})
</script>
And this is my code for my page.html:
<script>
$(document).ready(function() {
$("#main").bind('swiperight',function(event, ui){
$.mobile.changePage("index.html", "slide");
})
})
</script>