Menu not expanding properly
-
Hello,
I recently discovered an issue where the menu’s would not expand. I tracked it down to a function in themes.js, which referenced Masonry. However in bavotasan_add_js the masonry JS was not included on all pages. The code as follows did not work:
`if ( is_singular() ) {
if ( get_option( ‘thread_comments’ ) )
wp_enqueue_script( ‘comment-reply’ );
} else {
$var[‘loader’] = BAVOTASAN_THEME_URL . ‘/library/images/ajax-loader.gif’;
$var[‘more_text’] = ‘<em>’ . __( ‘No more posts.’, ‘carton’ ) . ‘</em>’;wp_enqueue_script( ‘masonry’, BAVOTASAN_THEME_URL .’/library/js/masonry.min.js’, ”, ‘3.1.1’, true );
}However, once changed to the following, all began to work:
if ( is_singular() ) {
if ( get_option( ‘thread_comments’ ) )
wp_enqueue_script( ‘comment-reply’ );
} // else {
// Should not be ELSE as theme.js depends on masonry to be there!
$var[‘loader’] = BAVOTASAN_THEME_URL . ‘/library/images/ajax-loader.gif’;
$var[‘more_text’] = ‘<em>’ . __( ‘No more posts.’, ‘carton’ ) . ‘</em>’;wp_enqueue_script( ‘masonry’, BAVOTASAN_THEME_URL .’/library/js/masonry.min.js’, ”, ‘3.1.1’, true );
// }
`Seems like a bug, either theme.js needs to exclude any mention of masonry or the above change needs to be made.
–Edward
- The topic ‘Menu not expanding properly’ is closed to new replies.