<html>
<head>
<script src="//code.jquery.com/jquery.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="row">
<div class="col-md-3 well">
<ul class="nav nav-pills nav-stacked example" id="myTab" style="height: 200px; overflow: auto">
<li id="cZero" class="active">
<a href="#tab_publish" data-toggle="pill">Publish</a>
</li>
<li id="cOne" >
<a href="#tab_draft" data-toggle="pill">Drafts</a>
</li>
</ul>
</div>
<div class="col-md-9">
<div class="tab-content">
<div class="tab-pane bonecard-listPublish active" id="tab_publish">
</div>
</div>
</div>
</div>
</body>
</html>
div.bonecardSmall {
background-color: white;
margin: 10px;
width: 340px;
height: 210px;
border: 2px solid black;
border-left: 2px solid black;
padding: 10px;
border-radius: 20px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
border-radius: 20px;
border-radius-topright: 50px;
border-radius-bottomright: 50px;
box-sizing: content-box;
border-radius: 20px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
position: relative;
float: left;
transition: color 0.5s ease;
}
div.bonecardSmall:after, div.bonecardSmall:before {
background-color: white;
position: absolute;
display: block;
content:"";
border: 2px solid black;
border-right: 2px solid white;
width: 6px;
left: -10px;
}
div.bonecardSmall:before {
top: 60px;
height: 60px;
}
div.bonecardSmall:after {
top: 180px;
height: 30px;
}
div.bonecardSmall img {
max-width: 45%;
border-radius: 5px;
border-radius: 5px;
border-radius: 5px;
margin-left: 50px;
border:2px solid black
}
div.bonecardSmallP {
background-color: white;
margin: 10px;
width: 340px;
height: 210px;
border: 2px solid black;
border-left: 2px solid black;
padding: 10px;
border-radius: 20px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
border-radius: 20px;
border-radius-topright: 50px;
border-radius-bottomright: 50px;
box-sizing: content-box;
border-radius: 20px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
position: relative;
float: left;
transition: color 0.5s ease;
}
div.bonecardSmallP:after, div.bonecardSmallP:before {
background-color: white;
position: absolute;
display: block;
content:"";
border: 2px solid black;
border-right: 2px solid white;
width: 6px;
left: -10px;
}
div.bonecardSmallP:before {
top: 60px;
height: 60px;
}
div.bonecardSmallP:after {
top: 180px;
height: 30px;
}
div.bonecardSmallP img {
max-width: 45%;
border-radius: 5px;
border-radius: 5px;
border-radius: 5px;
margin-left: 50px;
border:2px solid black
}
$(document).ready(init);
function init() {
$(".bonecard-listPublish").each(function(index) {
var dpublish = document.getElementById("tab_publish");
var publishcontent,publishpaging;
var counter = 0, counterName=0;
var arrayNames=[];
for(var i=0; i<12; i++) {
if(counter == 0){
publishpaging=document.createElement("div");
var name="df"+counterName;
publishpaging.id=name;
counterName=counterName+1;
arrayNames.push(name);
counter++;
publishcontent=document.createElement("div");//"<div class='bonecardSmall'></div>";
publishcontent.className = "bonecardSmallP";
publishcontent.id=i;
if(arrayNames.length > 0){
//publishcontent.style.display="";
publishcontent.setAttribute("style", "display: none;");
//$(publishcontent).css('display','none');
}
publishpaging.appendChild(publishcontent);
}
else if(counter == 3){
counter = 0;
publishcontent=document.createElement("div");//"<div class='bonecardSmall'></div>";
publishcontent.className = "bonecardSmallP";
publishcontent.id=index.id;
publishpaging.appendChild(publishcontent);
dpublish.appendChild(publishpaging);
}
else{
counter++;
publishcontent=document.createElement("div");//"<div class='bonecardSmall'></div>";
publishcontent.className = "bonecardSmallP";
publishcontent.id=index.id;
publishpaging.appendChild(publishcontent);
}
}
if(counter !== 0){
dpublish.appendChild(publishpaging);
}
var ulpagination=createPagination(arrayNames);
dpublish.appendChild(ulpagination);
});
function createPagination(names){
var uiPaging=document.createElement("ul");
uiPaging.className="pagination";
var liPaging=document.createElement("li");
var aPaging=document.createElement("a");
aPaging.innerHTML="«";
aPaging.href="#"+names[0];
liPaging.appendChild(aPaging);
uiPaging.appendChild(liPaging);
for(i=0;i<names.length;i++){
var liPaging =document.createElement("li");
var aPaging =document.createElement("a");
aPaging.innerHTML=i+1;
aPaging.href="#"+names[i];
liPaging.appendChild(aPaging);
uiPaging.appendChild(liPaging);
}
aPaging.innerHTML="»";
aPaging.href="#"+names[names.length-1];
liPaging.appendChild(aPaging);
uiPaging.appendChild(liPaging);
var centerdiv=document.createElement("div");
centerdiv.className="text-center";
centerdiv.appendChild(uiPaging);
return centerdiv;
};
};
Output
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. |