added toggling for navbar collapse on anchor click.