Created
August 15, 2012 16:30
-
-
Save robballou/3361407 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(function($){ | |
$(document).ready(function(){ | |
$('.section-header').each(function(){ | |
var $this = $(this); | |
// use .add() and .nextUntil() to get both the .section-header | |
// and .section-item elements into a single set for our .wrapAll() call | |
$this.add($this.nextUntil('.section-header', '.section-item')) | |
.wrapAll('<div class="section-container"></div>'); | |
}); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment