<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Hello world !!</title>
<style type="text/css">
.slider-wrap {
height:200px;
overflow:hidden;
width:500px;
}
.slider {
height:200px;
margin:0;
padding:0;
position:relative;
}
.slider img{
display:block;
float:left;
height:200px;
list-style:inline ;
margin:0;
padding:0;
width:500px;
overflow:hidden;
}
#navigation li {
list-style:none ;
display:inline;
cursor:pointer;
padding:5px;
border:1px solid #000;
background:#3f3f3f;
color:#fff;
}
</style>
</head>
<body>
<div class="slider-wrap">
<div class="comix" style="width: 1500px;">
<img src="http://www.staging.newslaundry.com/wp-content/themes/newslaundry_new_design/images/logo3.png">
<img src="http://pagead2.googlesyndication.com/simgad/1624678127307863859">
<img src="http://resources2.news.com.au/images/2012/10/23/1226501/426670-peter-gabriel-so-album-cover.jpg">
</div>
<div id="navigation">
<ol>
<li class="page">1</li>
<li class="page">2</li>
<li class="page">3</li>
<li class="page">4</li>
</ol>
</div>
</body>
</html>
$(document).ready(function(){
var sliderwidth = 500;
$('#navigation li').bind('click',function() {
$('.slider').animate({left:"-" + sliderwidth * $(this).index() },1000);
});
});
Output
300px
This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account
Dismiss xKeyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |