Reputation: 1975
I'm new to AMP and am interested in creating a page with AMP. Since AMP doesn't allow Javascript, I was wondering how I can implement a feature that allows scrolling to an element with an on-click event? I couldn't find any references on AMP project. Any pointers much appreciated.
Upvotes: 1
Views: 1817
Reputation: 4055
Scrolling is not implemented in AMP. However you can use the old and trusty anchor tags with href pointing to element id.
If you want to implement scrolling. You need to implement your own solution and submit a pull request to the AMP Project.
Upvotes: 2