$(document).ready(function () { /* Every time the window is scrolled ... */ $(window).scroll(function () { /* Check the location of each desired element */ $('.hideme').each(function (i) { var bottom_of_object = $(this).position().top + $(this).outerHeight(); var bottom_of_window = $(window).scrollTop() + $(window).height(); /* If the object is completely visible in the window, fade it it */ if (bottom_of_window > bottom_of_object) { $(this).animate({ 'opacity': '1' }, 500); } }); }); $('.hideme').each(function (i) { var bottom_of_object = $(this).position().top + $(this).outerHeight(); var bottom_of_window = $(window).scrollTop() + $(window).height(); /* If the object is completely visible in the window, fade it it */ if (bottom_of_window > bottom_of_object) { $(this).animate({ 'opacity': '1' }, 500); } if (document.getElementById("heading")) { $(document.getElementById("heading")).animate({ 'opacity': '1' }, 500); } if (document.getElementById("title-quotes")) { $(document.getElementById("title-quotes")).animate({ 'opacity': '1' }, 1500); } // document.getElementById("heading").animate({ // 'opacity': '1' // }, 500); }); }); // $.getJSON("/discord/bots/uwufier/assets/json/pun.json", function (data) { var items = []; let quoteNum = Math.floor(Math.random() * data.length); document.getElementById("title-quotes").innerHTML = ` ${data[quoteNum]} `; // $.each(data, function (key, val) { // items.push("