navbar working for toggled elements