From 954edc2df5750c19de6ef1ccbc12879d26f6ec81 Mon Sep 17 00:00:00 2001 From: Constanze Date: Mon, 25 Nov 2024 22:38:16 +0100 Subject: [PATCH] Update js file with venue --- main.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index 9568b85..7464392 100644 --- a/main.js +++ b/main.js @@ -23,8 +23,9 @@ function activeMove() { var heightAbout = $("#about").offset().top; var heightCfp = $("#cfp").offset().top; var heightSubmission = $("#submission").offset().top; + var heightVenue = $("#venue").offset().top; var heightProceedings = $("#proceedings").offset().top; - var heightContacts = $("#contacts").offset().top; + var heightContact = $("#contact").offset().top; $(window).scroll(function() { var windowPos = window.pageYOffset; if (windowPos > heightHome) { @@ -32,44 +33,50 @@ function activeMove() { $(".about-li").removeClass("active"); $(".cfp-li").removeClass("active"); $(".submission-li").removeClass("active"); + $(".venue-li").removeClass("active"); $(".proceedings-li").removeClass("active"); - $(".contacts-li").removeClass("active"); + $(".contact-li").removeClass("active"); } if (windowPos > heightAbout) { $(".home-li").removeClass("active"); $(".about-li").addClass("active"); $(".cfp-li").removeClass("active"); $(".submission-li").removeClass("active"); + $(".venue-li").removeClass("active"); $(".proceedings-li").removeClass("active"); - $(".contacts-li").removeClass("active"); + $(".contact-li").removeClass("active"); } if (windowPos > heightCfp) { $(".about-li").removeClass("active"); $(".cfp-li").addClass("active"); $(".submission-li").removeClass("active"); + $(".venue-li").removeClass("active"); $(".proceedings-li").removeClass("active"); - $(".contacts-li").removeClass("active"); + $(".contact-li").removeClass("active"); } if (windowPos > heightSubmission) { $(".about-li").removeClass("active"); $(".cfp-li").removeClass("active"); $(".submission-li").addClass("active"); + $(".venue-li").addClass("active"); $(".proceedings-li").removeClass("active"); - $(".contacts-li").removeClass("active"); + $(".contact-li").removeClass("active"); } if (windowPos > heightProceedings) { $(".about-li").removeClass("active"); $(".cfp-li").removeClass("active"); $(".submission-li").removeClass("active"); + $(".venue-li").removeClass("active"); $(".proceedings-li").addClass("active"); - $(".contacts-li").removeClass("active"); + $(".contact-li").removeClass("active"); } if (windowPos > heightContacts) { $(".about-li").removeClass("active"); $(".cfp-li").removeClass("active"); $(".submission-li").removeClass("active"); + $(".venue-li").removeClass("active"); $(".proceedings-li").removeClass("active"); - $(".contacts-li").addClass("active"); + $(".contact-li").addClass("active"); } }) }