Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>jQuery UI Button - Checkboxes</title>
  6. <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  7. <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  8. <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  9. <link rel="stylesheet" href="/resources/demos/style.css">
  10.  
  11. <style>
  12. #format { margin-top: 2em; }
  13. </style>
  14. </head>
  15. <body>
  16. <div id="format">
  17. <input type="checkbox" id="check1"><label for="check1">Option 1<br><img src="http://www.sustainweb.org/img/alert_small_star.png"></label>
  18. <input type="checkbox" id="check2"><label for="check2">Option 2<br><img src="http://www.sustainweb.org/img/alert_small_star.png"></label>
  19. <input type="checkbox" id="check3"><label for="check3">Option 3<br><img src="http://www.sustainweb.org/img/alert_small_star.png"></label>
  20. <p id="text1">Hello</p>
  21. <p id="text2">Bye</p>
  22. <p id="text3">Other</p>
  23. <script>
  24. $(function() {
  25. $( "#check" ).button();
  26. $( "#format" ).buttonset();
  27. });
  28. $( "#check2" ).click(function() {
  29. $( "#text2" ).toggle();
  30. });$( "#check3" ).click(function() {
  31. $( "#text3" ).toggle();
  32. });
  33.  
  34. </script>
  35. </div>
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement