JSFiddle - React, Tailwind, and code Playground

by Al Kasih

HTML

<div class="slider">
<div class="slideshow">
<a href="#" class="slider-item"><img src="img/temp-featuredwork.png" alt="icon" width="545" height="254" border="0" /></a>
<a href="#" class="slider-item"><img src="img/temp-featuredwork.png" alt="icon" width="545" height="254" border="0" /></a>
 <a href="#" class="slider-item"><img src="img/temp-featuredwork.png" alt="icon" width="545" height="254" border="0" /></a>
  <a href="#" class="slider-item"><img src="img/temp-featuredwork.png" alt="icon" width="545" height="254" border="0" /></a>
</div>
    </div>
     <!--/slider-->
    <ul class="controls">
        <li><a href="#">1</a></li>
        <li><a href="#">2</a></li>
        <li><a href="#">3</a></li>
        <li><a href="#">4</a></li>
     </ul>

JavaScript

$(document).ready(function(){
$('.slideshow').each(function(){
var $this = $(this);
var pager = $this.find('.controls');

$this.cycle({
fx:     'fade',
speed:  'slow',
timeout: 5000,
pager:  pager,
pagerAnchorBuilder: function(idx, slide) {
// return sel string for existing anchor
return '.controls li:eq(' + (idx) + ') a';
}
}); 

});
});