Yet another simple jquery slider (30.03.2016)
Very easy to customize jquery slider with fixed width slides.

JavaScript
$( ".left_arr" ).click(function() {
  if(parseInt($( ".line" ).css("margin-left")) > (($( ".line .slide" ).length-1)*-400)) {
    $( ".fbline" ).animate({
    "margin-left": "-=400",
    }, 1000, function() {
    });
  }
});
$( ".right_arr" ).click(function() {
  if(parseInt($( ".line" ).css("margin-left"))<0) {
    $( ".line" ).animate({
    "margin-left": "+=400",
    }, 1000, function() {
    });
  }
});

HTML

<div class="container">
  <div class="line">
    <div class="slide">1</div>
    <div class="slide">2</div>
    <div class="slide">3</div>
  </div>
</div>

CSS

.slide{
  width: 300px;
  padding: 0 50px;
  display: inline-block;
  text-align: center;
}
.container {
  margin: 0 80px;
  overflow: hidden;
}
.line {
  display: inline-block;
  width: 9999px;
}
jQuery
comments powered by Disqus
JavaScript (13)
PHP (11)
Brainfuck (8)
adm (8)
Joomla (4)
Canvas (3)
answers (2)
API (2)
CMS (2)
Modx (2)
jQuery (1)
Ajax (1)
SQL (1)
Shell (1)
batch (1)
10-6