Skip to content

Instantly share code, notes, and snippets.

@MrFent
Created March 23, 2016 19:08
Show Gist options
  • Save MrFent/f477badbe7d23060dce5 to your computer and use it in GitHub Desktop.
Save MrFent/f477badbe7d23060dce5 to your computer and use it in GitHub Desktop.
function template(
return sprintf('<div class="carousel data-speed="5000">Hello</div>');
}
<?php
return ob_get_clean();
}
function scripts(){
ob_start(); ?>
<!-- carousel_js -->\n
<script type="text/javascript">
var carouselSpeed = $('.carousel').data('speed');
(function($) {
$('#pagelinescarousel').carousel({ interval: carouselSpeed })
})(jQuery);
</script>
<?php
return ob_get_clean();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment