Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. $(document).ready(function() {
  2. $.ajax({
  3. type: "get",
  4. url: "team.json",
  5. beforeSend: function() {
  6. $("#team").html("Loading...");
  7. },
  8. timeout: 10000,
  9. error: function(xhr, status, error) {
  10. alert("Error: " + xhr.status + " - " + error);
  11. },
  12. dataType: "json",
  13. success: function(data) {
  14. $.getJSON("team.json", function(data){
  15. $.each(data, function() {
  16. $.each(this, fucntion(key, value)){
  17. $("#team").append(
  18. "Name: " + value.name + "<br>" +
  19. "Title: " + value.title + "<br>" +
  20. "Bio: " + value.bio + "<br><br>" +
  21.  
  22. );
  23. });
  24. });
  25. });
  26. }
  27. });
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement