Link to home
Start Free TrialLog in
Avatar of Alex Lord
Alex Lord

asked on

scrollTo not working

 $('body').scrollTo('#testingScroll');

Open in new window


suppose to go to

 <li id="testingScroll" class="column">

Open in new window


this list container which is closed and has html inside but the js isnt working, it just sitting in normal button. any tips ?
Avatar of David Favor
David Favor
Flag of United States of America image

Provide a clickable URL or you can do this yourself.

Run your HTML through https://validator.w3.org/nu/ first + ensure you have zero errors + warnings.

My guess, with fragment you provided, is you have some complex, cascading HTML syntax errors, which are causing your HTML to be parsed into the DOM incorrectly.
Hi,

I'm using this snippet
https://codepen.io/lenamtl/pen/PxMbZm

or simply try to update scrollTo to scrollTop
ASKER CERTIFIED SOLUTION
Avatar of Zakaria Acharki
Zakaria Acharki
Flag of Morocco image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial