Viewing File: /home/ubuntu/ridge-crop-landing-ui/assets/js/script.js



// scroll responsive top nav

$(document).ready(function() {
    $(window).scroll(function() {
        if ($(document).scrollTop() > 50) {
            $(".header-nav-center").addClass("header-fixed");
        } else {
            $(".header-nav-center").removeClass("header-fixed");
        }
    });
});

/*------------- Smooth Click Scroll -------------*/

$('a.smooth[href^="#"]').on('click', function(event) {
    var target = $(this.getAttribute('href'));
    if (target.length) {
        event.preventDefault();
        $('html, body').stop().animate({
            scrollTop: target.offset().top
        }, 1000);
    }
});

$(document).ready(function () {
    $("#header").load("header.html");
    $("#footer").load("footer.html");
    $("#cta-faq").load("faq.html");
    $("#contact-form").load("common-form.html");
});

$('.dropdown').mouseover(function () {
    if ($('.navbar-toggler').is(':hidden')) {
        $(this).addClass('show').attr('aria-expanded', 'true');
        $(this).find('.dropdown-menu').addClass('show');
        // $('.dropdown-toggle').addClass('demoo');
        $('.dropdown-toggle').attr('aria-expanded', 'true');
        $('.dropdown-mega .dropdown-menu ').attr('data-bs-popper','static');
        // data-bs-popper="static"
    }
}).mouseout(function () {
    if ($('.navbar-toggler').is(':hidden')) {
        $(this).removeClass('show').attr('aria-expanded', 'false');
        $(this).find('.dropdown-menu').removeClass('show');
        // $('.dropdown-toggle').removeClass('demoo');
        $('.dropdown-toggle').attr('aria-expanded', 'false');
        $('.dropdown-mega .dropdown-menu ').removeAttribute('data-bs-popper','static');

    }
});
Back to Directory File Manager