Active vs Inactive state
-
Hi Mark
This is the 2nd project I’m using Sticky Menu and loved it from the first!
However, I could never successfully code different CSS for the inactive and active states for my menu. It seems that classes “cloned” [older version] or “sticky-element-active” [newer version] is appended to the div by default
On my 1st project – where I was using the older version of this plugin, I added a jQuery fix as shown below
jQuery(window).bind('scroll', function () { if (jQuery(window).scrollTop() > 50) { jQuery('.logoBar').addClass('fixed'); } else { jQuery('.logoBar').removeClass('fixed'); } });I tried using your suggested CSS selector and it’s not working for obvious reason and that is “sticky-element-active” shows up even in non-sticky state
.sticky-element-original:not(.sticky-element-active)What do you think Mark? Should I go ahead and add the jQuery fix?
The topic ‘Active vs Inactive state’ is closed to new replies.