A book about the command line for humans.

footer.html 837B

12345678910111213141516171819202122232425262728293031323334353637
  1. <script>
  2. $(document).ready(function () {
  3. // ☜ ☝ ☞ ☟ ☆ ✠ ✡ ✢ ✣ ✤ ✥ ✦ ✧ ✩ ✪
  4. var closed_sigil = 'show';
  5. var open_sigil = 'hide';
  6. var togglesigil = function (elem) {
  7. var sigil = $(elem).html();
  8. if (sigil === closed_sigil) {
  9. $(elem).html(open_sigil);
  10. } else {
  11. $(elem).html(closed_sigil);
  12. }
  13. };
  14. $(".details").each(function () {
  15. var $this = $(this);
  16. var $button = $('<button class=clicker-button>' + closed_sigil + '</button>');
  17. var $details_full = $(this).find('.full');
  18. $button.click(function (e) {
  19. e.preventDefault();
  20. $details_full.toggle({
  21. duration: 550
  22. });
  23. togglesigil(this);
  24. });
  25. $(this).find('.clicker').append($button);
  26. $button.show();
  27. });
  28. $('.details .full').hide();
  29. });
  30. </script>
  31. </body>
  32. </html>