jQuery(".homeSlider").slick({
customPaging: function (slick, index) {
// Add leading zero for single-digit slide numbers
var slideNumber = (index + 1 < 10) ? '0' + (index + 1) : (index + 1);
// Remove the zero after count 9
slideNumber = (index + 1 === 10) ? '' + (index + 1) : slideNumber;
return "<a>" + slideNumber + "</a>";
},
});
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter