Skip to content

Instantly share code, notes, and snippets.

@vitorfs
Last active July 10, 2016 12:41
Show Gist options
  • Save vitorfs/15706e2b84ca865d1f7f534196c224ac to your computer and use it in GitHub Desktop.
Save vitorfs/15706e2b84ca865d1f7f534196c224ac to your computer and use it in GitHub Desktop.
jQuery Wrap Function
<h3>First</h3>
<h3>Second</h3>
<h3>Third</h3>
$("h3").wrap("<div class='wrapper'></div>")
<div class='wrapper'>
<h3>First</h3>
</div>
<div class='wrapper'>
<h3>Second</h3>
</div>
<div class='wrapper'>
<h3>Third</h3>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment