Viewing File: /home/ubuntu/theridgecorp-landing/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");
$("#forex").load("forex.html");
$("#spot-metals").load("spot-metals.html");
$("#spot-indices").load("spot-indices.html");
$("#spot-energies").load("spot-energies.html");
$("#crypto-cdf").load("crypto-cdf.html");
$("#etfs-cfd").load("etfs-cfd.html");
$("#ndfs-cfd").load("ndfs-cfd.html");
$("#shares-usa-cfd").load("shares-usa-cfd.html");
$("#shares-asia-cfd").load("shares-asia-cfd.html");
$("#shares-eu-cfd").load("shares-eu-cfd.html");
$("#export-v2").load("export-v2.html");
$("#forex-margin").load("forex-margin.html");
$("#spot-metals-margin").load("spot-metals-margin.html");
$("#spot-indices-margin").load("spot-indices-margin.html");
$("#spot-energies-margin").load("spot-energies-margin.html");
$("#crypto-as-cfd-margin").load("crypto-as-cfd-margin.html");
$("#ndfs-as-cfd-margin").load("ndfs-as-cfd-margin.html");
$("#etfs-as-cfd-margin").load("etfs-as-cfd-margin.html");
$("#shares-usa-cfd-margin").load("shares-usa-cfd-margin.html");
$("#shares-eu-cfd-margin").load("shares-eu-cfd-margin.html");
$("#shares-asia-cfd-margin").load("shares-asia-cfd-margin.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