I’m struggling to get the nav working properly on a one-page site design. The line under the menu item doesn’t indicate the correct page, but rather the prior page. If I scroll down slightly, it will change to highlight the correct page. The menu bar seems to change when the anchor tag gets 50% of the way through the header (vertically).
I would appreciate any suggestions.
http://sebring-airport.com/ftz/
Thanks, Cara
Hi,
Try adding this at the very end of your theme / child theme functions.php file:
function add_custom_script(){
?>
<script>
(function($){
$(window).load(function() {
$(this).trigger('resize');
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Regards,
Josue
Thank you! Thank you! Thank you!
Works perfectly now. :)