Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #338454
    Cherise
    Participant

    Hope someone will be able to assist me.

    I made a 1 pager, and anchored the sections to the menu.

    You have to click on the menu items multiple times, especially on a mobile device, before it actually jumps to the section on the page. The website is http://www.kylabrandonwedding.co.za

    Please assist asap?

    #338455
    minal
    Keymaster

    Hello @Cherise,

    It seems you have js conflict with your navigations.

    So here is the Custom js snippets for you to fixed above issue.

    
    
    document.querySelectorAll('header .menu-item a[href^="#"]').forEach(anchor => {
      anchor.addEventListener('click', function (e) {
        e.preventDefault();
        const target = document.querySelector(this.getAttribute('href'));
        if (target) {
           target.scrollIntoView({
           behavior: 'smooth',
         });
       }
      });
    });
    

    and for adding js in your theme you have to install a plugin for that

    here is the link https://wordpress.org/plugins/custom-css-js/

    Hope it works for you

    Sincerely,

    Minal

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.