-
-
Save veekram/44875ca351568b9f7a89a08906b4e8ae to your computer and use it in GitHub Desktop.
Ajax loading indicator (Spinner) with Rails/SASS/Bootstrap 2/FontAwesome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p><a class="btn btn-primary" data-remote="true" href="path/to/resource"> | |
<i class="spinner"></i>do something</a> | |
</p> | |
<p> | |
<i class="spinner"></i> | |
<a class="btn btn-primary" data-remote="true" href="path/to/resource">do something</a> | |
</p> | |
<p><a class="btn btn-primary btn-spinner" data-remote="true" href="path/to/resource"> | |
Neue Nachricht</a> | |
</p> | |
<form> | |
<button class="btn btn-primary btn-spinner" name="button" type="submit"> | |
do something | |
</button> | |
<button class="btn btn-primary" name="button" type="submit"> | |
<i class="spinner"></i> | |
do something | |
</button> | |
<p> | |
<i class="spinner"></i> | |
<button class="btn btn-primary" name="button" type="submit"> | |
do something | |
</button> | |
</p> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p | |
= link_to example_path, class: 'btn btn-primary' remote: true do | |
i.spinner | |
| do something | |
p | |
i.spinner | |
= link_to example_path, class: 'btn btn-primary', remote: true do | |
| do something | |
p | |
= link_to example_path, class: 'btn btn-primary btn-spinner', remote: true do | |
| do something | |
= simple_form_for @example, :html => { remote: true } do |f| | |
= f.button :button, :class => 'btn-primary btn-spinner', type: :submit do | |
| do something | |
= form_for @example, remote: true do |f| | |
= f.button :button, :class => 'btn-primary btn-spinner', type: :submit do | |
| do something | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment