Last active
August 29, 2015 13:56
-
-
Save jdabs/9212253 to your computer and use it in GitHub Desktop.
hiding sidebars/boxes in Soholaunch with a Foundation template
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
<!--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