I am a complete novice - with rudimentary HTMS coding knowledge - trying to figure out javascript coding with Corvid.
I have a dropdown - with its various choices assigned with ‘value’(s) 1, 2, 3, etc.
I want the user to ‘jump to’ particular anchors (on the same page), when they pick an option from the dropdown…
I have used the following code to try and achieve this - but obviously there’s something wrong. Even though the code-panel is NOT putting up any ‘red flags’ for my code, yet NOTHING happens when the dropdown choices are picked.
export function dropdown1_change(event) {
if ($w.dropdown1 === 1) {
$w.anchor1.scrollTo(true);
} else if ($w.dropdown1 === 2) {
$w.anchor2.scrollTo(true);
}}
Any help/ guidance/ tutorial would be much appreciated!