Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Radio Buttons > Improving the Display with buttonset ()

Improving the Display with buttonset ()

The radio buttons shown in Figures 5-5 and 5-6, are certainly more visually pleasing than the traditional radio buttons, but it would be better to organize them to show that they form a block. We can do this by slightly modifying the HTML code with the changes shown in bold:

<!DOCTYPE html>
<script src = jquery.js></script>
<script src = jqueryui/js/jquery-ui-1.8.16.custom.min.js></script>

<link rel=stylesheet type=text/css
      href=jqueryui/css/smoothness/jquery-ui-1.8.16.custom.css />

<div>
  Sex : <input type=radio name=sex id=m><label for=m>Male</label></input>
         <input type=radio name=sex id=f><label for=f>Female</label></input>
</div>

<script>

$("input").button ();
$("div").buttonset ();

</script>

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial