From c1b413b4fcbc15436d667a436cd53fe066fe2414 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 28 Mar 2014 17:31:40 +0100 Subject: ersetze location.href durch changePage --- js/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/index.js') diff --git a/js/index.js b/js/index.js index b75f45a..53fd366 100644 --- a/js/index.js +++ b/js/index.js @@ -96,7 +96,7 @@ function download_pdf(link, id){ $('#pdf-' + id).attr('data-plan-url', theFile.toURL()); if(location.href.indexOf("page-") == -1){ - location.href = "#page-vplan-" + id; + $.mobile.changePage("#page-vplan-" + id); } }, function(error){ @@ -144,7 +144,7 @@ function get_overview(link){ var resultl = result.match(plans_re).length; if(resultl == 0){ - location.href = "#loginpopup"; + $.mobile.changePage("#loginpopup"); $("#loginform").removeClass('ui-disabled'); return; } @@ -157,14 +157,14 @@ function get_overview(link){ if(j + 1 < resultl){ $('#page-vplan-' + j).on('swipeleft', function(event){ console.log("Wisch links"); - location.href = "#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) + 1); + $.mobile.changePage("#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) + 1)); }); } if(j - 1 >= 0){ $('#page-vplan-' + j).on('swiperight', function(event){ console.log("Wisch rechts"); - location.href = "#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) - 1); + $.mobile.changePage("#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) - 1)); }); } -- cgit v1.3.1