You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
868 B

  1. $(function() {
  2. $(".fetch-json").each(function(idx, el) {
  3. $.getJSON(el.dataset.url, function(data) {
  4. el.innerText = JSON.stringify(data);
  5. });
  6. });
  7. $("#show-svg").click(function() {
  8. $("#badges-svg").show();
  9. $("#badges-json").hide();
  10. $("#badges-shields").hide();
  11. })
  12. $("#show-json").click(function() {
  13. $("#badges-svg").hide();
  14. $("#badges-json").show();
  15. $("#badges-shields").hide();
  16. })
  17. $("#show-shields").click(function() {
  18. $("#badges-svg").hide();
  19. $("#badges-json").hide();
  20. $("#badges-shields").show();
  21. })
  22. $("#show-with-late").click(function() {
  23. $(".no-late").hide();
  24. $(".with-late").show();
  25. })
  26. $("#show-no-late").click(function() {
  27. $(".with-late").hide();
  28. $(".no-late").show();
  29. })
  30. });