Skip to content

Instantly share code, notes, and snippets.

@urbiworx
Last active August 29, 2015 14:18
Show Gist options
  • Save urbiworx/2760aa46399b8c58548e to your computer and use it in GitHub Desktop.
Save urbiworx/2760aa46399b8c58548e to your computer and use it in GitHub Desktop.
Easy way to create In-Content Editing Slider within Business Catalyst
<div class="bxslider">
<div ice:editable="section" class="slide" style="position: relative;">
<img alt="" width="1200" height="400" src="http://placehold.it/1200x400" ice:editable="image" />
</div>
</div>
<script>
$(document).ready(function(){
if($("bc-skip").length==0){ //not in edit mode, start bxslider
$('.bxslider').bxSlider();
}
else //we are in edit mode, do not start bx slider and allow scrolling within the bxslider div for editing purposes
{
$(".bxslider").parent().css("overflow-y","auto");
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment