jQuery(window).on( 'scroll', function(){ jQuery('.et_pb_row').each(function(i) { get_id = jQuery(this).attr('id'); if(get_id){ var stickyTop = jQuery('#'+get_id).offset().top-130; if (jQuery(window).scrollTop() >= stickyTop) { jQuery('.page-menu ul li a').removeClass('active'); jQuery('.page-menu ul li a[href="#'+get_id+'"]').addClass('active'); } } }); });
Jagdish Sarma Asked question May 18, 2021