Optimize html, switch js to other slot