Added js function for nav-tabs