Hi,
I'm working on a custom javascript based viewer. This viewer will allow a user to perform a query, then it zooms to the relevant extent. This aspect is working great. However i'd like to add a jquery spinner when the query is performed and stop it once the extent has been zoomed to.
For whatever reason, I can't get this spinner to work within the script tags of the arcgis javascript viewer.
I have tried various methods using javascript and other libraries. The basic methodology i'm pursuing is to create two functions, one to stop the spinner, the other to hide the spinner. I downloaded the javascript and css files from the following github: jQuery Spin . I have referenced these in the head of the html page. I have placed the following functions in the map viewer script tags.
function stopSpinner(){
$('.spin').spin('hide');
}; function startSpinner(){
$('.spin').spin('show');
};
The startSpinner() function will be called on the same button click as the query operation, the stopSpinner() would be called immediately after a getExtent call.
Are there any issues with using jquery and the arcgis javascript api ?
Any advice would be greatly appreciated.
Thanks,
Damien
Solved! Go to Solution.
Since you're using the esri API I'll point you towards the quick and easy dojo solution: dojox.widget.Standby — The Dojo Toolkit - Reference Guide
Since you're using the esri API I'll point you towards the quick and easy dojo solution: dojox.widget.Standby — The Dojo Toolkit - Reference Guide
Thanks Josh! This is great!