0

jQuery(window).on( 'scroll', function(){
        jQuery('.entry-content .et-l.et-l--post .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 June 16, 2021
Add a Comment