Skip to content

Instantly share code, notes, and snippets.

@sente
Last active March 22, 2017 22:04
Show Gist options
  • Save sente/0752c2f3bac09445a7b45ffb2329465c to your computer and use it in GitHub Desktop.
Save sente/0752c2f3bac09445a7b45ffb2329465c to your computer and use it in GitHub Desktop.
sortable color-grid
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$(".sortable").sortable();
});
</script>
<style type="text/css">
* { font-family: monospace;}
</style>
</head>
<body>
<ul class="sortable">
<li><table style="display:inline"> <tr id="00"> <td style="background-color: rgb(055,129,193)">00</td> <td style="background-color: rgb(055,129,193)">rgb(055,129,193)</td> <td style="background-color: rgb(055,193,129)">rgb(055,193,129)</td> <td style="background-color: rgb(193,129,055)">rgb(193,129,055)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="01"> <td style="background-color: rgb(053,131,180)">01</td> <td style="background-color: rgb(053,131,180)">rgb(053,131,180)</td> <td style="background-color: rgb(053,180,131)">rgb(053,180,131)</td> <td style="background-color: rgb(180,131,053)">rgb(180,131,053)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="02"> <td style="background-color: rgb(059,132,167)">02</td> <td style="background-color: rgb(059,132,167)">rgb(059,132,167)</td> <td style="background-color: rgb(059,167,132)">rgb(059,167,132)</td> <td style="background-color: rgb(167,132,059)">rgb(167,132,059)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="03"> <td style="background-color: rgb(057,133,156)">03</td> <td style="background-color: rgb(057,133,156)">rgb(057,133,156)</td> <td style="background-color: rgb(057,156,133)">rgb(057,156,133)</td> <td style="background-color: rgb(156,133,057)">rgb(156,133,057)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="04"> <td style="background-color: rgb(128,115,178)">04</td> <td style="background-color: rgb(128,115,178)">rgb(128,115,178)</td> <td style="background-color: rgb(128,178,115)">rgb(128,178,115)</td> <td style="background-color: rgb(178,115,128)">rgb(178,115,128)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="05"> <td style="background-color: rgb(059,134,144)">05</td> <td style="background-color: rgb(059,134,144)">rgb(059,134,144)</td> <td style="background-color: rgb(059,144,134)">rgb(059,144,134)</td> <td style="background-color: rgb(144,134,059)">rgb(144,134,059)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="06"> <td style="background-color: rgb(143,111,164)">06</td> <td style="background-color: rgb(143,111,164)">rgb(143,111,164)</td> <td style="background-color: rgb(143,164,111)">rgb(143,164,111)</td> <td style="background-color: rgb(164,111,143)">rgb(164,111,143)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="07"> <td style="background-color: rgb(146,112,153)">07</td> <td style="background-color: rgb(146,112,153)">rgb(146,112,153)</td> <td style="background-color: rgb(146,153,112)">rgb(146,153,112)</td> <td style="background-color: rgb(153,112,146)">rgb(153,112,146)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="08"> <td style="background-color: rgb(063,135,130)">08</td> <td style="background-color: rgb(063,135,130)">rgb(063,135,130)</td> <td style="background-color: rgb(063,130,135)">rgb(063,130,135)</td> <td style="background-color: rgb(130,135,063)">rgb(130,135,063)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="09"> <td style="background-color: rgb(156,109,137)">09</td> <td style="background-color: rgb(156,109,137)">rgb(156,109,137)</td> <td style="background-color: rgb(156,137,109)">rgb(156,137,109)</td> <td style="background-color: rgb(137,109,156)">rgb(137,109,156)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="10"> <td style="background-color: rgb(088,132,115)">10</td> <td style="background-color: rgb(088,132,115)">rgb(088,132,115)</td> <td style="background-color: rgb(088,115,132)">rgb(088,115,132)</td> <td style="background-color: rgb(115,132,088)">rgb(115,132,088)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="11"> <td style="background-color: rgb(159,109,124)">11</td> <td style="background-color: rgb(159,109,124)">rgb(159,109,124)</td> <td style="background-color: rgb(159,124,109)">rgb(159,124,109)</td> <td style="background-color: rgb(124,109,159)">rgb(124,109,159)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="12"> <td style="background-color: rgb(158,110,111)">12</td> <td style="background-color: rgb(158,110,111)">rgb(158,110,111)</td> <td style="background-color: rgb(158,111,110)">rgb(158,111,110)</td> <td style="background-color: rgb(111,110,158)">rgb(111,110,158)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="13"> <td style="background-color: rgb(108,129,100)">13</td> <td style="background-color: rgb(108,129,100)">rgb(108,129,100)</td> <td style="background-color: rgb(108,100,129)">rgb(108,100,129)</td> <td style="background-color: rgb(100,129,108)">rgb(100,129,108)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="14"> <td style="background-color: rgb(131,123,093)">14</td> <td style="background-color: rgb(131,123,093)">rgb(131,123,093)</td> <td style="background-color: rgb(131,093,123)">rgb(131,093,123)</td> <td style="background-color: rgb(093,123,131)">rgb(093,123,131)</td> </tr> </table></li>
<li><table style="display:inline"> <tr id="15"> <td style="background-color: rgb(144,118,096)">15</td> <td style="background-color: rgb(144,118,096)">rgb(144,118,096)</td> <td style="background-color: rgb(144,096,118)">rgb(144,096,118)</td> <td style="background-color: rgb(096,118,144)">rgb(096,118,144)</td> </tr> </table></li>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment