JQUERY infinite Slider with variable size of images, previous and next button

JQUERY infinite Slider with variable size of images, previous and next button

PLEASE, help me..

How to create an infinitive slider with different width of imgs, like this EXAMPLE WITH PLUGIN,OR LIKE THIS but without any plugin.. I would like to learn and not put plugin without understand. THANK YOU SO MUCH..

$(document).ready(function() {

enter code here

});