要素1

要素2

<style>
	.wrainn div,.wrainn p	{border:dotted 1px red;margin:10px;padding:20px;}
	.wrainn span	{border:dotted 1px blue;margin:10px;padding:10px;}
</style>
<script>
	$(function(){
		$('.wrainn div,.wrainn p').wrapInner('<span></span>');
	});
</script>
<div class="wrainn">
	<div>要素1</div>
	<p>要素2</p>
</div>