-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
35 lines (24 loc) · 1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
JQUERY TOGGLE BUTTON
Chris Korhonen <[email protected]>
http://sourcebottle.net
http://twitter.com/ckorhonen
A simple plugin for toggling the content and functionality of a link or button
element.
Useful when disabling links or submit buttons, or when responding to a user's
interaction.
E.g. User clicks a button, text changes to inform them that something is going
on, and button is disabled to prevent further clicks.
USAGE:
$('#element).toggleButton();
Upon first call, element will go to toggled state. Second call will restore to
normal.
Parameters can also be passed:
$('#element').toggleButton({ text: 'Processing...',
className: 'disabled',
preventClick: true
});
text - The text value which replaces the button text in the toggled state.
className - CSS class name corresponding to the toggled state
preventClick - Prevent clicks once toggled.
License:
http://www.opensource.org/licenses/mit-license.php