jQuery plugin slider

Demo snippet code

by ajinkyax

HTML

<aside>
    
</aside>

JavaScript

(function($){
    $.fn.ajSlider = function(options){
        var defaults = {
        
        };
        
        var config = $.extend(defaults, options);
        
        this.each(function(){
            var $this = $(this);
            var timer = window.setInterval(function(){
                $this.animate({left: -202}, config.speed, function(){
                    $this.css({left: 0}).children('li:first').remove().appendTo($this);
                });
            }, config.duration);
        });
        
        return this;
    };
})(jQuery);

$(function(){
    $('#slider').ajSlider({speed: 3000});
});