jQuery Async Demo
Asynchronous button
Instead of using the .click() jQuery function, use the .async() to make your button visibly wait.
The action can either succeed of fail, triggering a different animation on the button.
Test asynchronous user actionEmbed the params in the HTML attributes
If your javascript is bundled and minified, you cannot easily pass a page parameter like a user id to the javascript function.
jQuery async does that for you by reading the async-params attribute of your button in a JSON format and deliver it in your code
Test embedded paramsDifferent triggers
You can bind .async() on a different trigger than the usual "click" event
In this example the async is binded to the "change" event so once you have typed in the postal code and you leave the input, the function is triggered: