Skip to content

Instantly share code, notes, and snippets.

@jdabs
Last active August 29, 2015 13:56
Show Gist options
  • Save jdabs/9212253 to your computer and use it in GitHub Desktop.
Save jdabs/9212253 to your computer and use it in GitHub Desktop.
hiding sidebars/boxes in Soholaunch with a Foundation template
<!--Assuming your sidebar is completely empty (i.e. nothing is in its cell),
this will remove the sidebar and expand the content area -->
<section>
<div class="row">
<div class="large-8 columns middle">
#content#
</div>
<div class="large-4 medium-4 columns">
<div id="box-one" class="boxOne-panel">#BOX1#</div>
</div>
</div>
</section>
#jquery# <!-- This pound variable loads jquery in Ultra. Use your own jquery or Foundation's default link if you prefer -->
<script>
$(function () {
if ($("#box-one").html().length === 0){
$(".boxOne-panel").remove();
$(".middle").addClass("large-12").removeClass("large-8"); /* Assuming a content area that uses 8 foundation columns,
this expands it out to 12 columns */
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment