Documentation: UberMenu Sticky

Knowledgebase Docs » UberMenu Sticky

Visual Composer Javascript Error 2

These instructions only apply to versions prior to v3.0 The Conflict If you are using the Visual Composer plugin with certain elements like the Progress Bar or Pie Charts, you’ll get a javascript error because “the sticky method does not exist in jQuery Waypoints”. This is because Visual Composer loads the Waypoints library via the wp_footer hook, which overrides UberMenu Sticky’s Waypoints; and since Visual Composer’s version of Waypoints doesn’t contain the sticky function, an error occurs. Solution The simplest way to resolve this is to re-enqueue the Sticky script so that it is loaded after Visual Composer’s. Add this PHP to your theme’s functions.php to resolve the issue:

View

Anchor Hash Tag Link Spacing 2

When you use a fixed menu like the Sticky Menu, the top 40-60 pixels of your site are always covered by the menu. That means when you scroll to hash tag linked items (e.g. Section 1), the element you are scrolling to may get hidden under the menu. To fix this, there’s an interesting trick you can use. Add the hashlink class to the element with the ID to make sure it is spaced below the menu when it is scrolled to. Of course, you can also change the selector/class to whatever you like. Change the spacing value (80) to any value you prefer, but make sure the margin and height always net to 0. Here’s a more in-depth article on the subject: Hash Tag Links That Don’t Headbutt The Browser Window

View

ubermenu_sticky_apply 0

The ubermenu_sticky_apply filter allows you to enable or disable sticky functionality based on your custom conditions. Set $apply_sticky to false to disable the sticky functionality or true to enable it. Here’s some example code with two examples.

View