lovespring
lovespring

Reputation: 19559

How to disable ajax nav system when call $.mobile.changePage?

I have disable ajax in jquery mobile mobileinit event. but when i use $.mobile.changePage to load page, It still use ajax to load pages.

......
<script src="/Templates/js/jquery-1.8.0.js"></script>
<script>
$(document).on("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
});
</script>
<script src="/Templates/js/jquery.mobile-1.2.0.js"></script>
......

mobileinit works, just when i use $.mobile.changePage, it use ajax. I mean normal link isn't using ajax now, just when I call this function, ajax still be used

Upvotes: 2

Views: 2159

Answers (1)

CodeStig
CodeStig

Reputation: 100

Had the same problem with

$.mobile.changePage( url );

with $.mobile.ajaxEnabled = false.

Had to use this instead.

window.location = url;

Upvotes: 1

Related Questions