How to Clone Existing Items Into Circular Slider On Beginning and End
Can you please take a look at
This Demo
let me know how I can clone items into the
ul
to make a Circular Slider list. as you can see I have this list as following code but I need to clone first item (left slide) or last item (right slide) at
beginning and end of the list.
- var item = $(".thumbnail").width();
- var paddT = $(".thumbnail").css('margin-left');
- item = item + 20;
- $(".leftslide").on("click", function () {
- $(".list-inline").animate({
- left: '-=' + item + 'px'
- }, 300);
- });
- $(".rightslide").on("click", function () {
- $(".list-inline").animate({
- left: '+=' + item + 'px'
- }, 300);
- });
Thanks.