Fixed JS bug causing tabs not to hide with conditional logic

Signed-off-by: Elliot Condon <e@elliotcondon.com>