Code:
<div class="wwbuttons">
<a class="green" href="javascript:void(0);" title="anchor short description">My Anchor</a>
</div>
To init buttons run this code:
$(document).ready(function(){$(".wwbuttons>a").wwbutton();});
<input> tag example
Code:
<div class="wwbuttons">
<input class="grey" type="button" title="button short description" value="My Input" />
</div>
To init buttons run this code:
$(document).ready(function(){$(".wwbuttons>input").wwbutton();});
<button> tag example
Code:
<div class="wwbuttons">
<button class="grey" type="button" title="button short description">My button</button>
</div>
To init buttons run this code:
$(document).ready(function(){$(".wwbuttons>button").wwbutton();});
Disabled and active buttons by default
Code:
To set buttons as disabled just add disabled="disabled" tag (ex: <button class="grey" type="button" disabled="disabled">).
To set active button add "active" class (ex: <button class="grey active" type="button">).
Code:
$(<selector>).wwbutton('toggle', <enable>});
Where:
<selector> is button or group selector.
<enable> is true to enable or false to disable.
Agreement example
Agree with something
Code:
$(<selector>).wwbutton('toggle', $(this).is(':checked'));
Where:
<selector> is button or group selector.
$(this).is(':checked') is checkbox state.