On nav-bar open/close event

7 views
Skip to first unread message

shawncrawley

unread,
Apr 14, 2016, 6:45:24 PM4/14/16
to Tethys Platform
Is it possible to detect the nav-bar open/close event so I can programatically trigger another event?

shawncrawley

unread,
Apr 14, 2016, 6:48:06 PM4/14/16
to Tethys Platform
Note: I am about to apply a Mutation Observer to the element that receives/loses the nav-bar class, but I wondered if there is a better way.

ezra.j.rice

unread,
Apr 15, 2016, 12:09:07 AM4/15/16
to Tethys Platform
Are you trying to detect it in your .js file? If I recall, it should just be a toggle on the classes. Nathan can give a more definitive answer, but if it is a class toggle then you can check for the class to trigger an event.


On Thursday, April 14, 2016 at 4:45:24 PM UTC-6, shawncrawley wrote:

swainn

unread,
Apr 15, 2016, 1:16:09 PM4/15/16
to Tethys Platform
Ezra is right. Look for the 'show-nav' class on the #app-content-wrapper div. The behavior is that the 'show-nav' class is toggled on to open the nav and toggles off to close the nav.
Reply all
Reply to author
Forward
0 new messages