css transitions and js syntax/naming fix