Simple jQuery Slider

https://github.com/wallpageNET/jquery_example/tree/master/slider

$(document).ready(() => {  
	let slideCount = $('#slider ul li').length;
	let slideWidth = $('#slider ul li').width();
	let slideHeight = $('#slider ul li').height();
	let sliderUlWidth = slideCount * slideWidth; 
	$('#slider ul').css({ width: sliderUlWidth, marginLeft: - slideWidth });
	$('#slider ul li:last-child').prependTo('#slider ul');
	$('a.right').on('click',(e) => { 
		$('#slider ul').animate({
		    left: + slideWidth
		}, 500, () => {
		    $('#slider ul li:last-child').prependTo('#slider ul');
		    $('#slider ul').css('left', '');
		});
	});
	$('a.left').on('click',(e) => { 
		$('#slider ul').animate({
		    left: - slideWidth
		}, 500, () => {
		    $('#slider ul li:first-child').appendTo('#slider ul');
		    $('#slider ul').css('left', '');
		});
        });
});