Gre*_*g W 5

$(target).replaceWith('<div>test</div>'); 
Run Code Online (Sandbox Code Playgroud)