Miss Mitzi – Eye on the Web

Graphic Design | Interface Design | Typography | Mobile-Responsive Web Design | Advertising | The Internet for Beginners

FIX: Dropdown menu cut off in Optimal theme

03.24.2017 by Miss Mitzi // Leave a Comment

Problem:

With persistent nav in Optimal theme v. 1.5, you scroll down and trigger the persistent navigation at top with content scrolling beneath. But sadly, if you roll over the nav, the dropdown menus (or submenus if you like) are cut off at the edge of the persistent nav:

dropdowns-cut-off2

Here’s the fix, thanks to Wes, in Appfinite’s Forum:

http://appfinite.com/topic/epik-navigation-appearing-behind-headline-on-pages/

Here’s the original top function inside /wp-content/themes/optimal/js/global.js:

jQuery(function( $ ){

// Add shrink class to site header after 50px
$(document).on(“scroll”, function(){

if($(document).scrollTop() > 250){
$(“.site-header”).addClass(“shrink fadeup-effect”);

} else {
$(“.site-header”).removeClass(“shrink fadeup-effect”);
}

});

To fix, replace that section with this:

jQuery(function( $ ){

// Add shrink class to site header after 50px
$(document).on(“scroll”, function(){

if($(document).scrollTop() > 250){
$(“.site-header”).addClass(“shrink”);

} else {
$(“.site-header”).removeClass(“shrink”);
}

});

And, voilà! Normal menus, not cut off:

dropdowns-FIXED

Categories // WordPress Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Find A Topic!

Copyright © 2025 · Modern Studio Pro Theme on Genesis Framework · WordPress · Log in