Accessible Button 1.1
Details
- Author
- 3i1a4o
- Current version
- 1.1
- GitHub
- mashalla/button
- Downloads
- 560
- Category
- Widgets
- Tags
- Report
- GitHub Issues
How to use
<input class='button' id="MooAccessButton" type="button" value="Push me" onclick="alert('You pushed the button successfully.')"/>
#JS
window.addEvent('domready', function() {
var mooAccessButton = new AccessibleButton({
'button' : $('MooAccessButton'), // input button element
'ariaDescription' : 'MooAccessButtonDescription' // allows you to define a element that describes the button
})
var mooAccessToggleButton = new AccessibleButton({
'button' : $('MooAccessToggleButton'),
'ariaDescription' : 'MooAccessToggleButtonDescription',
'toggle' : true,
'clickFunction' : function(e) { // event function for pressing the button
$('buttonLive').set('html','Button pressed.')
},
'releaseFunction' : function(e) { // event function for releasing the button
$('buttonLive').set('html','Button released.')
}
})
});
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus