Scrolling tab

PHOTO EMBED

Wed Aug 10 2022 13:27:13 GMT+0000 (UTC)

Saved by @ali_naqvi #php #javascript #html

 $(document).on("scroll", onScroll);

        //smoothscroll
        $('.page-template-cannabis-101 .c-secondary-nav a[href^="#"]').on('click', function (e) {
            // e.preventDefault();
            // $(document).off("scroll");

            // $('.page-template-cannabis-101 .c-secondary-nav a').each(function () {
            //     $(this).removeClass('active');
            // })
            // $(this).addClass('active');

            // var target = this.hash,
            //     menu = target;
            // $target = $(target);
            $('html, body').stop().animate({
                'scrollTop': $target.offset().top + 2
            }, 500, 'swing', function () {
                window.location.hash = target;
                $(document).on("scroll", onScroll);
            });
        });
content_copyCOPY