-
-
Save iamntz/1178075 to your computer and use it in GitHub Desktop.
Wrap box for my current project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.borderedBox, #content').each(function() { | |
var t = $(this), | |
mainClasses = this.className, | |
mainIds = this.id, | |
idAttr = ( mainIds ? ' id="' + mainIds + '"' : '' ), | |
classAttr = ( mainClasses ? ' class="' + mainClasses + '"' : '' ); | |
t.wrap('<div ' + idAttr + classAttr + ' / >'); | |
t.removeAttr('class').removeAttr('id'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment