adds collapsable behaviour to nav bar