JAVASCRIPT   105

2021symposium js

Guest on 23rd May 2022 02:00:03 AM

  1. let requestURL = "https://sdat-dev.github.io/resources/researchdata/data/2021symposium.json";
  2. let request = new XMLHttpRequest();
  3. //getting content Element to append grants information
  4. let maincontentContainer = document.getElementsByClassName('main-content')[0];
  5. request.open('GET', requestURL);
  6. request.responseType = 'json';
  7. request.send();
  8. request.onload = function () {
  9.     let content = '';
  10.     const webelementsjson = request.response;
  11.     //condition for checking if browser is Internet Explorer
  12.     let webelements = ((false || !!document.documentMode)) ? JSON.parse(webelementsjson) : webelementsjson;
  13.     let contentElement = document.createElement('div');
  14.     contentElement.classList.add('content');
  15.     contentElement.innerHTML = getContent(webelements);
  16.     maincontentContainer.appendChild(contentElement);
  17.     addfooter();
  18. }
  19.  
  20. $('.carousel').carousel({
  21.     pause: "false",
  22.     interval: 2000
  23.  
  24. });

Raw Paste


Login or Register to edit or fork this paste. It's free.