Skip to content

Instantly share code, notes, and snippets.

@thierrypigot
thierrypigot / scripts.js
Last active July 6, 2023 19:26
[Beaver Builder] Highlight menu links on a One Page with anchor links and sections detection on scroll
(function($){
$(document).ready(function(){
/**
* This part handles the highlighting functionality.
* We use the scroll functionality again, some array creation and
* manipulation, class adding and class removing, and conditional testing
*/
var aChildren = $("header ul.menu li").children(); // find the a children of the list items