(function($) {"use strict"; $(document).ready(function() { // Add parent-hover class to hovered parent items $('#moomenu li').hover(function () { $(this).addClass('parent-hover'); }, function () { $(this).removeClass('parent-hover'); }); // Smoothscroll $('.scrollto').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 800); return false; } } }); }); })(jQuery); (function() { document.addEventListener('DOMContentLoaded', function() { var executeThis = function() { var continuousElements = document.getElementsByClassName("animate") for (var i = 0; i < continuousElements.length; i++) { new Waypoint({ element: continuousElements[i], handler: function() { this.element.classList.add("animated"); }, offset: "85%" }) } }; var checkWaypoint = function() { if (typeof Waypoint === "undefined") { setTimeout(checkWaypoint, 50); } else { executeThis(); } }; checkWaypoint(); let modListIcons = document.body.querySelectorAll(".mod-list-icon"); modListIcons.forEach(e => { e.parentNode.classList.add("mod-list-icon-parent"); }); }); })();