<!-- potential container for appendAround -->
<div class="foo" data-set="foobarbaz"></div>
<ul>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<li>Vestibulum auctor dapibus neque.</li>
</ul>
<!-- potential container for appendAround -->
<div class="bar" data-set="foobarbaz"></div>
<ul>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<li>Vestibulum auctor dapibus neque.</li>
</ul>
<!-- initial container for appendAround -->
<div class="baz" data-set="foobarbaz">
<p class="sample">Sample appendAround Element</p>
</div>
/* the sample appendaround element */
.sample {
padding: 1em;
background: tan;
}
.baz {
display: block;
}
.foo,
.bar {
display: none;
}
@media (min-width: 30em){
.bar {
display: block;
}
.foo, .baz {
display: none;
}
}
@media (min-width: 50em){
div.foo {
display: block;
}
div.bar, div.baz {
display: none;
}
}
$( ".sample" ).appendAround();