I want to change a button to a loading state when a synchronous AJAX call is being executed. Except the jQuery code (in Chrome) that change the button to loading state freezes until the AJAX call is finished. So the loading state will show up for maybe 1 ms after de ajax call. I want to change a button to a loading state wh