Created
August 21, 2015 06:35
-
-
Save anonymous/601619165d3862be842f to your computer and use it in GitHub Desktop.
// source http://jsbin.com/piraneyoya
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style id="jsbin-css"> | |
/* ghostClass */ | |
.ghost { | |
opacity: .5; | |
background: #C8EBFB; | |
} | |
body { | |
padding: 20px; | |
} | |
.list-group-item { | |
cursor: move; | |
} | |
</style> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> | |
<!-- Latest Sortable --> | |
<script src="http://rubaxa.github.io/Sortable/Sortable.js"></script> | |
<!-- Simple List --> | |
<div id="simpleList" class="list-group"></div> | |
<script id="jsbin-javascript"> | |
Sortable.create(simpleList, { | |
ghostClass: 'ghost' | |
}); | |
// Generate 100 items | |
simpleList.innerHTML = Array.apply(null, new Array(100)).map(function (v, i) { | |
return '<div class="list-group-item">item ' + | |
(i + 1) + | |
'</div>'; | |
}).join(''); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><\!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> | |
<\!-- Latest Sortable --> | |
<script src="http://rubaxa.github.io/Sortable/Sortable.js"><\/script> | |
<\!-- Simple List --> | |
<div id="simpleList" class="list-group"></div> | |
</script> | |
<script id="jsbin-source-css" type="text/css">/* ghostClass */ | |
.ghost { | |
opacity: .5; | |
background: #C8EBFB; | |
} | |
body { | |
padding: 20px; | |
} | |
.list-group-item { | |
cursor: move; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">Sortable.create(simpleList, { | |
ghostClass: 'ghost' | |
}); | |
// Generate 100 items | |
simpleList.innerHTML = Array.apply(null, new Array(100)).map(function (v, i) { | |
return '<div class="list-group-item">item ' + | |
(i + 1) + | |
'</div>'; | |
}).join('');</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ghostClass */ | |
.ghost { | |
opacity: .5; | |
background: #C8EBFB; | |
} | |
body { | |
padding: 20px; | |
} | |
.list-group-item { | |
cursor: move; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sortable.create(simpleList, { | |
ghostClass: 'ghost' | |
}); | |
// Generate 100 items | |
simpleList.innerHTML = Array.apply(null, new Array(100)).map(function (v, i) { | |
return '<div class="list-group-item">item ' + | |
(i + 1) + | |
'</div>'; | |
}).join(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment