switching via js works