Reputation: 71
Anyone can help me. I have problem with my blog.
I want to input slicky slider on homepage blogger. I have script fromm codepen : https://codepen.io/jamy/pen/gbdWGJ
my question is, how to input this script on blogger template.
var flkty = new Flickity( '.main-gallery', {
cellAlign: 'left',
contain: true,
wrapAround: true,
prevNextButtons: false,
autoPlay: 5000
});
I try same option but always failed. thx
Upvotes: 2
Views: 1746
Reputation: 71
Thanks all for an answer. Finally, steep maybe like this:
<script src='http://cdnjs.cloudflare.com/ajax/libs/flickity/1.0.0/flickity.pkgd.min.js' type='text/javascript' />
< script type = 'text/javascript' >
//<![CDATA[
var flkty = new Flickity('.main-gallery', {
cellAlign: 'left',
contain: true,
wrapAround: true,
prevNextButtons: false,
autoPlay: 5000
});
//]]>
<
/script>
/* ---- page dots ---- */
.flickity-page-dots {
position: absolute;
width: 100%;
bottom: 25px;
padding: 0;
margin: 0;
list-style: none;
text-align: center;
line-height: 1;
}
.flickity-rtl .flickity-page-dots { direction: rtl; }
.flickity-page-dots .dot {
display: inline-block;
width: 10px;
height: 10px;
margin: 0 8px;
background: #333;
border-radius: 50%;
opacity: 0.25;
cursor: pointer;
}
.flickity-page-dots .dot.is-selected {
opacity: 1;
}
Upvotes: 2
Reputation:
Your code use a Flickity function and you need to add external Flickity files in your template.
Put this in the head and before your code
<script src="http://cdnjs.cloudflare.com/ajax/libs/flickity/1.0.0/flickity.pkgd.min.js"></script>
Upvotes: 0