JSFiddle - React, Tailwind, and code Playground

by ranasaani

HTML

<div style="width: 200px !important; ">
    <div id="myDiv" style="height: 60px !important">
        <img src="http://www.fiveriverstech.com/wp-content/themes/fiverivers/images/about_s.jpg">
        <img src="http://www.fiveriverstech.com/wp-content/themes/fiverivers/images/about_s.jpg">
        <img src="http://www.fiveriverstech.com/wp-content/themes/fiverivers/images/about_s.jpg">
        <img src="http://www.fiveriverstech.com/wp-content/themes/fiverivers/images/about_s.jpg">
</div>
</div>
<input type=button id="left" value="< Left">
<input type=button id="right" value="Right >">

CSS

#myDiv{
    overflow:hidden;
    width:auto;
}

img{
    float:left;
    margin-left:3px;
    
    
}

JavaScript

$('#left').live('click' , function(){
    $('#myDiv').css("margin-left","-=10px");

})
$('#right').live('click' , function(){
    $('#myDiv').css("margin-left","+=10px");

})