Trying to create a same page link

https://www.new.enhancementsbyann.com/
Home page
yellow sections have classic column pricing table.
3 tables 3 buttons in each table = 9 buttons total

The yellow buttons are “Read More” buttons and i’m trying to link them to lower sections on the same page.
using # in button content and same ID in respective Row ID.
Can’t get the buttons to work .

Can you please review and let me know what i am doing wrong?

Thanks
Jane

credentails to follow in secure note

Hi Jane,

Please add your ids in your section element instead of row element and make sure it’s unique for that page.

After that, add this in Cornerstone > JS


jQuery(function($) {
    $( 'a[href^="#"]').on( "click", function(e) {
       e.preventDefault();
     $('html, body').animate({
        scrollTop: $($.attr(this, 'href')).offset().top
    }, 500);

    });
});

Hope that helps.

I added the unique IDs to the section element and deleted them from the row element.
I then added the JS
Appearance > Customize > Custom > EDIT GLOBAL JAVASCRIPT

Still not working. Not sure what I did wrong.

X needed to be updated, which I just did.
I believe that corrected the problem.
The button links are now working.
Thanks.

Jane

Glad to hear that, Jane.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.