-
-
Save plugn/fe45eef57234baa1c4911d3fc1dd5523 to your computer and use it in GitHub Desktop.
sortable multi jsbin
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>SRBL</title> | |
| <script src="http://rubaxa.github.io/Sortable/Sortable.js"></script> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div id="multi" style="margin-left: 30px"> | |
| <div><div data-force="5" class="layer title title_xl">Multi</div></div> | |
| <div class="layer tile" data-force="30"> | |
| <div class="tile__name">Group A</div> | |
| <div class="tile__list"> | |
| <img src="http://rubaxa.github.io/Sortable/st/face-01.jpg"/><!-- | |
| --><img src="http://rubaxa.github.io/Sortable/st/face-02.jpg"/><!-- | |
| --><img src="http://rubaxa.github.io/Sortable/st/face-03.jpg"/><!-- | |
| --><img src="http://rubaxa.github.io/Sortable/st/face-04.jpg"/> | |
| </div> | |
| </div> | |
| <div class="layer tile" data-force="25"> | |
| <div class="tile__name">Group B</div> | |
| <div class="tile__list"> | |
| <img src="http://rubaxa.github.io/Sortable/st/face-05.jpg"/><!-- | |
| --><img src="http://rubaxa.github.io/Sortable/st/face-06.jpg"/><!-- | |
| --><img src="http://rubaxa.github.io/Sortable/st/face-07.jpg"/> | |
| </div> | |
| </div> | |
| <div class="layer tile" data-force="20"> | |
| <div class="tile__name">Group C</div> | |
| <div class="tile__list"> | |
| <img src="http://rubaxa.github.io/Sortable/st/face-08.jpg"/><!-- | |
| --><img src="http://rubaxa.github.io/Sortable/st/face-09.jpg"/> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script id="jsbin-javascript"> | |
| var byId = function (id) { | |
| return document.getElementById(id); | |
| } | |
| function run() { | |
| // Multi groups | |
| Sortable.create(byId('multi'), { | |
| animation: 150, | |
| draggable: '.tile', | |
| handle: '.tile__name' | |
| }); | |
| [].forEach.call(byId('multi').getElementsByClassName('tile__list'), function (el){ | |
| Sortable.create(el, { | |
| group: 'photo', | |
| animation: 150 | |
| }); | |
| }); | |
| } | |
| run(); | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var byId = function (id) { | |
| return document.getElementById(id); | |
| } | |
| function run() { | |
| // Multi groups | |
| Sortable.create(byId('multi'), { | |
| animation: 150, | |
| draggable: '.tile', | |
| handle: '.tile__name' | |
| }); | |
| [].forEach.call(byId('multi').getElementsByClassName('tile__list'), function (el){ | |
| Sortable.create(el, { | |
| group: 'photo', | |
| animation: 150 | |
| }); | |
| }); | |
| } | |
| run();</script></body> | |
| </html> |
This file contains hidden or 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
| var byId = function (id) { | |
| return document.getElementById(id); | |
| } | |
| function run() { | |
| // Multi groups | |
| Sortable.create(byId('multi'), { | |
| animation: 150, | |
| draggable: '.tile', | |
| handle: '.tile__name' | |
| }); | |
| [].forEach.call(byId('multi').getElementsByClassName('tile__list'), function (el){ | |
| Sortable.create(el, { | |
| group: 'photo', | |
| animation: 150 | |
| }); | |
| }); | |
| } | |
| run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment