Thanks @arminunruh but the anchor point problem still persists on touchdevices after removing the script and updating the theme.
D
Diego_march
@Diego_march
Posts
-
Anchor points in touchdevices not working -
Anchor points in touchdevices not workingHello there @Armin-Unruh
The web i am currently building uses anchor points to create an index (Wikipedia style) in Desktop and touchdevices. I name the ID of the target row on the <a href>, and it worked wonders on all platforms.
http://videscreuades.com/edicion-2019
The thing is, after the update the anchorpoints in the mobile version do not work. Here's the code used in the page:
<p class="_SmartphoneTextN1" style="text-align: center;"> <a id="view-more" style="color: black;" href="#VC19-P1">1. El proyecto</a> <a id="view-more" style="color: black;" href="#VC19-P2">2. Protagonistas</a> <br /> <a id="view-more" style="color: black;" href="#VC19-P3">3. Rutas</a> <a id="view-more" style="color: black;" href="#VC19-P4">4. Exposición</a> <a id="view-more" style="color: black;" href="#VC19-P5">5. Galería</a> </p>
I haven't been able to find any explanation to why. Also, I put this script on the custom <head> part to ease the scroll effect.
<script> jQuery(document).ready(function(){ jQuery('body').on('click', '#view-more', function(event) { event.preventDefault(); jQuery('html, body').animate( { scrollTop: $anchor.top }, slow); }); }) </script>
Any help on how to make it work? I'd hate to rethink all the web navigation just for this since it's supposed to be a simple code.
Thanks.