PATH:
home
/
lab2454c
/
nfsin.com
/
wp-content
/
themes
/
igsin
/
inc
/
assets
/
js
$(document).ready(function () { // SITE HEADER SHRINKABLE var siteHeader = $(".site-header"); $(window).scroll(function () { if ($(document).scrollTop() > 10) { siteHeader.addClass("site-header--shrinked"); } else { siteHeader.removeClass("site-header--shrinked"); } // Scroll Top fade in out if ($(document).scrollTop() > 300) { $(".button--scroll-to-top").addClass("show"); } else { $(".button--scroll-to-top").removeClass("show"); } }); $(".button--scroll-to-top").on("click", function () { scrollToTop(0, 500); }); function scrollToTop(offset, duration) { $("html, body").animate({ scrollTop: offset }, duration); return false; } // TEST OVERFLOWING ELEMENT var docWidth = document.documentElement.offsetWidth; [].forEach.call(document.querySelectorAll("*"), function (el) { if (el.offsetWidth > docWidth) { console.log(el); } }); // NAVIGATION ACTIVE LINKS const basePath = ""; var current = location.pathname; current = current.replace("/", ""); current = basePath + current; var headerMenuLi = $(".site-header .nav-menu li"); activeNavLinkFunc(headerMenuLi); function activeNavLinkFunc(el) { var anchorLinks = el.find("a"); var firstListChild = el.first(); if (current !== "") { $(el).removeClass("active"); anchorLinks.each(function () { var $this = $(this); // if the current path is like this link, make it active if ($this.attr("href") === current) { $this.parent().addClass("active"); } }); } else { firstListChild.addClass("active"); } } // HEADER MOBILE DROPDOWN var navLinksDropBtns = $(".site-header__nav > ul li a span.dropdown-button"); navLinksDropBtns.each(function () { $(this).parent().next().first().slideUp(0); }); navLinksDropBtns.each(function () { $(this).on("click", function (e) { e.preventDefault(); if ($(this).parent().hasClass("has-dropdown")) { $(this).closest("li").siblings().find("ul").slideUp(300); $(this).closest("li").siblings().find("i").removeClass("fa-chevron-up").addClass("fa-chevron-down"); $(this).parent().next().first().slideToggle(300); if ($(this).find("i").hasClass("fa-chevron-down")) { $(this).find("i").removeClass("fa-chevron-down").addClass("fa-chevron-up"); } else { $(this).find("i").removeClass("fa-chevron-up").addClass("fa-chevron-down"); } } }); }); $('.maginific-trigger-link').magnificPopup({ type: 'image' // other options }); // MAGNIFIC POPUP // $(".gallery a").magnificPopup({ // type: "image", // gallery: { // enabled: true, // }, // }); //Banner Slider $(window).scroll(function () { if ($(this).scrollTop() > 50) { $('.navbar__top').addClass('shrink'); } else { $('.navbar__top').removeClass('shrink'); } }) $('.carousel__main__slider').owlCarousel({ margin: 0, autoplay: true, nav: true, dots:false, loop: false, responsive: { 0: { items: 1 }, 500: { items: 1 }, 700: { items: 1 }, 1000: { items: 1 }, 1299: { items: 1 } } }) $('.hamburger__menu').on('click', function() { $('.menu').toggleClass('animate'); }) });
[+]
..
[-] script.js
[edit]
[-] .htaccess
[edit]
[-] main.js
[edit]
[-] owl.carousel.js
[edit]