it's possible. you could wrap the js in a check for the nav's display property. or position it offscreen for all browsers via css and then reposition via js if the nav is visible.