Switch to head append for js