I want to create a tag for a carousel, but I only want to load the CSS and Javascript files when this tag is used on the site, but I can only make it work if I add it to the <body>
of my website.
Is there a way to only load is in the tag?
my tag example (that only works if I move the css and .js files into the website body:
<carousel>
<div class="row" hide="{$gg.filterApplied || $gg.redeem.redeemInProgress()}">
<div class="col-sm-12">
<div class="logos text-center">
<div class="divider"></div>
<div data-slick='{"slidesToShow": 4, "slidesToScroll": 4}'>
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
<div><h3>5</h3></div>
<div><h3>6</h3></div>
</div>
<div class="divider"></div>
</div>
</div>
</div>
<style scoped>
@import url("//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.css")
</style>
<script src="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.min.js"></script>
<script>
var self = this;
self.mixin(SharedMixin)
</script>
</carousel>