I have the following code.. But the spin effect doesn\'t happen until the ajax call is finished (which is pretty much useless)
$.ajax({ type:\"GET\",
Remove async:false from your $.ajax call. You are making it synchronous instead of asynchronous (the A in AJAX) and hanging the browser while it waits for a response.
async:false
$.ajax