Skip to content

Commit

Permalink
Update js file with venue
Browse files Browse the repository at this point in the history
  • Loading branch information
cobuyken committed Nov 25, 2024
1 parent 226acf9 commit 954edc2
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,60 @@ 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) {
$(".home-li").addClass("active");
$(".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");
}
})
}
Expand Down

0 comments on commit 954edc2

Please sign in to comment.