めも。
■HTML
<div class="target">target</div> <button type="button" class="js_btn">replace</button>
ボタンが押されたら上のdiv要素を置換してみる。
■Javascript
<script>
$(function(){
	$('.js_btn').click(function(){
		var elem = '<span>replaced</span>';
		$('.target').replaceWith(elem);
	})
})
</script>
こんな感じ。