add javascript for navbar