Smooth Scrolling HTML Menu

Posted in: Newspaper
Post count: 16

Hello
I’m trying to make a page that has a smooth scrolling sticky menu. But this menu will be html, not the wordpress menu widget.

This is my html menu code:

<div class=”specifications_fancy_sticky_containerr>

</div>

So, how can I insert this navigation label to my html code?

<span data-scroll-target="website address here" data-scroll-to-class="the class you used" data-scroll-offset="-100">name of menu item</span>

Post count: 20688

Hi,

That code you mention will work in a HTML widget as well. Wrap it in a div as well if needed. As long as you specify the data-scroll-to-class in the code it should work
https://www.screencast.com/t/XMQnX9ljqLh

Post count: 16

Hello thanks for answering.

My web page that has anchors: https://www.noiseash.com/menu_try
Jump ID: specifications

I’ve used this code but it doesn’t work 🙁 I’ve used “#specifications” version too but it didn’t work too.

<div> <span data-scroll-target="https://www.noiseash.com/menu_try" data-scroll-to-class="specifications" data-scroll-offset="-100">SPECIFICATIONS</span> </div>

Post count: 20688

The page does not exist – https://www.screencast.com/t/1yi2u93C

I tested it again. Example below.

You mentioned you will use HTML as a menu, like this
https://www.screencast.com/t/lx1Mn8sk6h
I want the Overview to link to scroll to a block down below for example, for the block I set the class “overview”
https://www.screencast.com/t/zDMLRaSEq

In the HTML code I set the class I used
https://www.screencast.com/t/fvL4fLpyPdIX
https://www.screencast.com/t/5vgOP1KJ

Saving the page and viewing it produces this result when I click on overview
https://www.screencast.com/t/5vgOP1KJ
The class can be set on rows as well if needed, or any element that has a custom class field.

Code used in my example in the HTML element
https://pastebin.com/50RWnpx1

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.