jquery - Fix scrollTo page flicker in wordpress child theme? -
when click menu items, page flickers before animated scrolling. seems need prevent default href action of menu items, can't find that.
i can't find 'scrollto' anywhere in theme code. heres's i've found in theme's header.php @ least... still can't find put preventdefault
<ul class="navigation"> <?php if (has_nav_menu( 'header-menu' )) { ?> <?php $the_menu = array( 'theme_location' => 'header-menu', 'container' => 'ul', 'menu_class' => 'menu', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'items_wrap' => '%3$s', 'depth' => 0 ); wp_nav_menu( $the_menu ); ?> <?php } ?> </ul>
if it's problem default href behaviour should in function before scrollto place preventdefault should like:
$("yourmenulink").click(function(event) { event.preventdefault(); scrollto.... });
Comments
Post a Comment