fixed some navbar and link problems with js

like that