I'm using JQuery mobile to develop a mobile site for my company. I created a button at the bottom of my site to allow the user to toggle between desktop and mobile versions. Upon clicking the button i fire an event that switches the masterpage to the respective version.
The problem i was experiencing was, when i'd flip to the desktop masterpage, i would get the new master markup, but it wouldn't register my css files, and my styles from my mobile master would persist.
I realized it was the JQuery Mobile script file that was causing it, and that turning off AJAX by putting:
- <form data-ajax="false" >
...on the form; that it fixed my style issues.
However, instead, i would like to just disable AJAX programmatically on the button click event, so i can use it when i want it, and disable it when someone clicks this site toggle button.
I tried using this:
- $.mobile.ajaxEnabled = false;
But it did not work, any ideas?
1