js syntax change mobile navbar fix