jQuery UI Widget : Button
jQuery UI Widget : Button
Button enhances standard form elements like button, input of type submit or reset or anchors to themable buttons with appropiate mouseover and active styles.
In addition to basic push buttons, radio buttons and checkboxes (inputs of type radio and checkbox) can be converted to buttons: Their associated label is styled to appear as the button, while the underlying input is updated on click.
EXAMPLE :
Button : buttonUI1.html
<!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/ jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/ jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/ jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("button").button(); }); </script> </head> <body style="font-size:62.5%;"> <button>Button label</button> </body> </html> |
Output :
Radio button : buttonUI2.html
<!DOCTYPE html> |
Output :
Learn from experts! Attend jQuery Training classes.