I have successfully mapped some XML data to my auto completes. I used XML because it is more familiar to me, but i think i should be using JSON to be consistent with the way my shop develops.
Here is my function using XML:
function (xmlResponse, callback) {
var data = $("STORE", xmlResponse).map(function () {
If i changed my webservice to return JSON, how would i do the identical thing? I think understanding this one example, will help me understand it in general and be able to apply what i learn here to different cases.
I want to use the autocomplete menu for a textbox, but instead of having to type something before you get results, i want the menu to pop up with all available options first on focus, then narrow as you type.
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.