• Resolved rlinn

    (@rlinn)


    I have a single page website with four sections. I would like to use mPS2id-highlight in my CSS. I’ve read about this and am confident that I can make it happen.

    However, when the home page loads, I want to have the first menu item highlighted to show that I am viewing the first section already. As the user clicks on the menu, mPS2id-highlight will then change which menu item is highlighted.

    Can I use mPS2id-highlight on page load, or is there another common technique to achieve this?

    Thank you.

    https://www.ads-software.com/plugins/page-scroll-to-id/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author malihu

    (@malihu)

    Yes you can use it. The script automatically adds the highlight class(es) on page load without the need to scroll the page first. This assuming your first target element is visible on the viewport. Is this what you need?

    Thread Starter rlinn

    (@rlinn)

    Thanks mahilu,

    I was using #top for my first menu item, so I didn’t have a <div> with an ID around the first section. With a couple of changes, I’ve been able to sandbox the highlighting and get it working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using mPS2id-highlight on page load’ is closed to new replies.