Sandbox: JavaScript

Much like Delegator.SpinOnSubmit, this delegator allows you to put a spinner on anything you like when something is clicked (instead of only on the submit event). Note that you don't need to use it with things like Delegator.Ajax and Behavior.FormRequest as they bake in support for Spinner themselves.

See also Delegator.SpinOnSubmit

<a data-trigger="spinOnClick" data-spinonclick-target="!div .box" class="btn btn-default">Put a spinner on the box below.</a>
<a data-trigger="unSpinOnClick" data-unspinonclick-target="!div .box" class="btn btn-default">Remove the spinner from the box below.</a>
<div class="box">I'm a box!</div>

Behavior Options

These options apply only to the data- tag invocation.

Name type default description
target string ~ The selector to item you wish to spin. If not set, spins the element with the trigger on it.