Hello All,
I have a select box that is inside a HTML embed. When one of the select box options is selected it jumps to a named anchor (section) on the same page. What I can’t seem wrap my head around is how to get the page to smoothly scroll to that named anchor (section).
How can I get the select box options to trigger the smooth scrolling that typical links have when pointing to a named anchor on the same page using the built in Webflow .js? or is there an easier way in handling this that I am missing?
Here is a sample of test code for reference:
<form onChange="location.href='/transportation' + document.getElementById('scheduleJump').value; return false;">
<select class="w-input" style="font-size: 16px;" id="scheduleJump" required >
<option value="" disabled selected>Please Choose One</option>
<option value="#section-01">When Clicked Smoothly Scroll to Some Section</option>
<option value="#section-02">When Clicked Smoothly Scroll to Some Section</option>
<option value="#section-03">When Clicked Smoothly Scroll to Some Section</option>
<option value="#section-04">When Clicked Smoothly Scroll to Some Section</option>
<option value="#section-05">When Clicked Smoothly Scroll to Some Section</option>
<option value="#section-06">When Clicked Smoothly Scroll to Some Section</option>
</select>
Thanks!