You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MenuSpy is great. Very performant and easy to use, as promised!
I implemented the Lavalamp effect (from the example) and that was pretty easy too.
But I ran into a snag when I needed to hide.lavalamp in the condition where no menu item is active. In my case, MS had removed .active for all menu items, but the .lavalamp remains in its last state (width and height set to the values from lastInViewElm).
I can't think of how to effect this remote item (i.e.: Not nested inside of an .active element or under the direct control of MS) in this case since the MS callback only fires when a new active element is assigned (as per the Docs and Source).
So I've been trying to figure out how to detect when no element is active without performance implications (i.e.: Not resorting to an on scroll handler and checking repeatedly for ms.lastInViewElm == null).
Questions:
Have I boiled this down correctly?
Is there an alternate method, that I haven't thought of, to accomplish the same? (I have a feeling this is the case. If true: Sorry in advance.)
PossibleFeature Request: Have the callback also fire when MS switches from an active element to no active element.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
MenuSpy is great. Very performant and easy to use, as promised!
I implemented the Lavalamp effect (from the example) and that was pretty easy too.
But I ran into a snag when I needed to hide
.lavalamp
in the condition where no menu item is active. In my case, MS had removed.active
for all menu items, but the.lavalamp
remains in its last state (width
andheight
set to the values fromlastInViewElm
).I can't think of how to effect this remote item (i.e.: Not nested inside of an
.active
element or under the direct control of MS) in this case since the MS callback only fires when a new active element is assigned (as per the Docs and Source).So I've been trying to figure out how to detect when no element is active without performance implications (i.e.: Not resorting to an on scroll handler and checking repeatedly for
ms.lastInViewElm == null
).Questions:
Thanks!
The text was updated successfully, but these errors were encountered: