dynamically activating navbar