JS tabs working properly after submitting form and reload