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.

26 lines
667 B

  1. $(function() {
  2. $(".json-response").each(function(idx, el) {
  3. $.getJSON(el.dataset.url, function(data) {
  4. el.innerHTML = "<code>" + JSON.stringify(data) + "</code>";
  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. });