<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
ul {
float:left;
width:75px;
border:1px solid #888;
list-style:none;
margin:5px; padding:5px;
}
ul#list1 {color:#080;}
ul#list2 {color:#800; text-align:right;}
.icon{
height: 16px;
width:16px;
background-image: url(http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/images/ui-icons_222222_256x240.png);
cursor: pointer;
}
ul#list1 .icon {
float:right;
background-position: -32px -48px; /* arrow east */
}
ul#list2 .icon {
float:left;
background-position: -96px -48px; /* arrow west */
}
</style>
<script>
$.fn.pushTo = function(toSelector)
{
$this = $(this);
$this.slideUp('slow', function(){$this.appendTo(toSelector).slideDown();});
return $this;
};
$(function(){
$('ul#list1 .move').live('click', function(){
$(this).closest('li').pushTo('ul#list2');
});
$('ul#list2 .move').live('click', function(){
$(this).closest('li').pushTo('ul#list1');
});
});
</script>
</head>
<body>
<ul id='list1'>
<li>Item 1 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
<li>Item 2 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
<li>Item 3 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
<li>Item 4 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
</ul>
<ul id='list2'>
<li>Item 5 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
<li>Item 6 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
<li>Item 7 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
<li>Item 8 <img class='icon move' src='http://3.bp.blogspot.com/_IKD9WtY5kxU/S4whF7yBQmI/AAAAAAAAAp4/4Ugx7MtnNZQ/blank.png'/></li>
</ul>
</body>
</html>
Output
300px
You can jump to the latest bin by adding /latest
to your URL
Keyboard 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. |