Image Album

A simple jQuery based image rotator/album

<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
  <title>Image Album</title>
  
  
  <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'>

      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>
  <div id="master">
  <div id="imageholder">
  </div>
  <div id="navigator">
    <ul></ul>
  </div>
</div>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script>

    <script  src="js/index.js"></script>

</body>
</html>
/* Downloaded from https://www.codeseek.co/ */
body
{
  margin:0px;
  background-color:#040d1a;
}
#master
{
  background-color:#FFFFFF;
  width:400px;
  height:200px;
  margin:100px auto;
  position:relative;
  overflow:hidden;
}
#imageholder
{
  position:absolute;
  top:0px;
  left:0px;
  width:0px;
}
#navigator
{
  position:absolute;
  height:20px;
  top:180px;
  left:0px;
  margin:0px;
}
#navigator ul
{
  margin: 0px 0px;
}
#navigator ul li
{
  list-style-type:none;
  display:inline-block;
  margin:5px;
}
#navigator ul li a
{
  display: block;
  height: 10px;
  width: 10px;
  background-color:#de1465;
  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
  filter: alpha(opacity=50);
  -moz-opacity:0.5;
  -khtml-opacity: 0.5;
  opacity: 0.5;
  border-radius:5px;
  -moz-border-radius:5px;
  text-decoration:none;
}
#navigator ul li a:hover
{
  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
  filter: alpha(opacity=100);
  -moz-opacity:1;
  -khtml-opacity: 1;
  opacity: 1;
}
/* Downloaded from https://www.codeseek.co/ */
var imageData = [{'title':'JQuery: write less, do more',
                  'src':'http://rahulchoubey.com/images/jquery.png'},{'title':'Knockout JS: MVVM based JS framework',
                  'src':'http://rahulchoubey.com/images/knockout.jpg'},{'title':'YUI: from Yahoo!',
                  'src':'http://rahulchoubey.com/images/yui.png'},{'title':'Mochikit',
                  'src':'http://rahulchoubey.com/images/mochikit.png'},{'title':'PrototypeJS',
                  'src':'http://rahulchoubey.com/images/prototype.png'} 
];
$(document).ready(function(){
  for(x in imageData){
    var $a = $('<li><a href="#">&nbsp;</a></li>');
    $('#navigator ul').append($a);
    $a.click(function(num){
        return function(){
          $('#imageholder').animate({left: (-(400 * num)+ 'px')}, 200);
                                    };
    }(x));
    $('#imageholder').append('<img src="'+imageData[x].src+'" />').css('width',parseInt($('#imageholder').css('width'),10)+400);
  }
});

This awesome code ( Image Album ) is write by Rahul Choubey, you can se more from this user in the personal repository

You can find the original code on Codepen.io

2018 © Rahul Choubey