support changing type with selector or by editing the location hash