Hey Anders,
I’m trying the same thing as well and not getting any results. My site is digitalgumdrop.com. I added jquery.sticky.js along with a new copy of global.js in the /js directory on my child theme. The global.js has the code
// Sticky Menu
$(window).load(function(){
$(".navigation").sticky({ topSpacing: 0 });
});
added to the top, right underneath jQuery(document).ready(function($) {
Then I adjusted my functions.php to this where sticky was enqueue first:
// Enqueue Javascript files
function hemingway_load_javascript_files() {
if ( !is_admin() )
wp_register_script( 'hemingway_sticky', get_template_directory_uri().'/js/jquery.sticky.js', array('jquery'), '', true );
wp_enqueue_script( 'hemingway_sticky' );
wp_register_script( 'hemingway_global', get_template_directory_uri().'/js/global.js', array('jquery'), '', true );
wp_enqueue_script( 'hemingway_global' );
}
After that, the menu bar still disappears. I have made other tweaks to bar including:
/* Center Main Menu Text */
ul.blog-menu {
text-align: center;
}
.blog-menu > li {
float: none;
display: inline-block;
}
I tried the routine on a fresh version of the theme and it works. Is there anything you might be able to suggest for my child theme?
Thanks for your time.