new-button.html revision 156ebe6ddd4a3a96d89c11fd3a7a9944af91f3f7
<!DOCTYPE HTML>
<html>
<body class='yui3-skin-sam'>
<button id="button-widget">button widget</button>
<button id="button-disabled">disabled?</button>
<style>
html, body{
}
</style>
<script type="text/javascript">
YUI({
filter: 'raw'
}).use('button', function(Y) {
var button = new Y.Button({
srcNode: '#button-widget',
label: 'Disable >>'
}).render();
var button2 = new Y.Button({
srcNode: '#button-disabled'
}).render();
button.on('click', function(){
button2.set('disabled', !button2.get('disabled'));
console.log('c');
});
/*-----*/
var button3 = new Y.ToggleButton({
label: 'toggle'
});
button3.on('click', function(){
console.log('d');
});
});
</script>
</body>
</html>