I’m currently working on a site that has a hidden section (schedule, rates). When you click a link button it is supposed to reveal that section and jump down to it. I can only get one or the other thing to happen. I’m using an anchor tag to do the jump to a div id=”extracontent” and I’m using a javascript function to hide and then reveal the content. But if it is hidden it just jumps down a little bit when it is revealed. If you click the button again, it jumps down fine. I’m pretty sure this is a timing thing but as I’m a complete newb when it comes to jquery or javascript I have no idea how to handle this.
You can check out the site here: http://www.davidarabis.com/OYoga/
Hope I was clear and thanks for any help.
You can simply add an onclick handler to your “slick-toggle” anchor element in HTML, like so: