tab js code fixed