JSFiddle - React, Tailwind, and code Playground
by Oscar Jara
HTML
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>
</head>
<body>
<div class="maincontain">
<div class="container">
<img src="http://designbeep.designbeep.netdna-cdn.com/wp-content/uploads/2010/11/1.collection-of-character-mascot-illustrator-tutorial.jpg">
<div class="squares">
<div id="drag1" class="drag ui-widget-content box-style2" tabindex="0" data-letter="a">
<p>a</p>
</div>
<div id="drag2" class="drag ui-widget-content box-style" tabindex="0" data-letter="b">
<p>b</p>
</div>
<div id="drag3" class="drag ui-widget-content box-style" tabindex="0" data-letter="c">
<p>c</p>
</div>
<div id="drag4" class="drag ui-widget-content box-style" tabindex="0" data-letter="d">
<p>d</p>
</div>
<div id="drag5" class="drag ui-widget-content box-style2" tabindex="0" data-letter="e">
<p>e</p>
</div>
<div id="drag6" class="drag ui-widget-content box-style" tabindex="0" data-letter="f">
<p>f</p>
</div>
<div id="drag7" class="drag ui-widget-content box-style" tabindex="0" data-letter="g">
<p>g</p>
</div>
<div id="drag8" class="drag ui-widget-content box-style" tabindex="0" data-letter="h">
<p>h</p>
</div>
<div id="drag9" class="drag ui-widget-content box-style2" tabindex="0" data-letter="i">
<p>i</p>
</div>
<div id="drag10" class="drag ui-widget-content box-style"...
CSS
.drag {
display:block;
height:61px;
line-height:25px;
width:61px;
text-align: center;
background:#ddd;
float:left;
}
table {
clear:both;
line-height:25px;
text-align:center;
}
.drop {
height:61.5px;
width:61.5px;
cursor: move;
-moz-transition: all 1s ease-out;
-webkit-transition: all 1s ease-out;
opacity: 1;
}
.maincontain {
height: 372px;
width: 621.5px;
border: solid 8pt lightgreen;
-webkit-box-shadow: 4px 4px 4px green;
-moz-box-shadow: 4px 4px 4px green;
box-shadow: 4px 4px 4px green;
}
.container {
height: 370px;
overflow: hidden;
position: relative;
width: 620px;
}
.container > img {
height: 370px;
position: absolute;
width: 371px;
z-index:-1;
cursor: move;
}
table {
margin: 0;
padding: 0;
line-height: 56px;
}
article, aside, figure, footer, header, hgroup,
menu, nav, section {
display: block;
}
table td {
border: 1px solid white;
border-style: dashed;
position: relative;
vertical-align: top;
cursor: move;
z-index: -1;
min-height:60px;
max-width:60.3px;
min-width:60.3px;
max-height:60px;
background: #cc66ff;
float:left;
}
table td div {
position: absolute;
width: 59.5px;
height: 59.5px;
cursor: move;
opacity: 1;
}
.tablestyle{
left: 10px;
position: absolute;
top: 10px;
color: white;
font-family: arial;
font-size: 35pt;
text-align: center;
}
.spellword {
-webkit-box-shadow: inset 0px 0px 10px 5px #176BC9;
box-shadow: inset 0px 0px 10px 5px #176BC9;
}
.squares {
width: 248px;
height: 367px;
position: absolute;
top: 0px;
left: 373px;
}
.squares: hover {
background: #176BC9;
...
JavaScript
var listOfWords = new Array();
listOfWords['mat'] = 'http://www.wav-sounds.com/cartoon/daffyduck1.wav';
listOfWords['cat'] = 'http://www.wav-sounds.com/cartoon/hankhill1.wav';
listOfWords['dog'] = 'http://www.wav-sounds.com/cartoon/bugsbunny1.wav';
listOfWords['pit'] = 'http://www.wav-sounds.com/cartoon/familyguy2.wav';
listOfWords['pot'] = 'http://www.wav-sounds.com/cartoon/porkypig1.wav';
listOfWords['fog'] = 'http://www.wav-sounds.com/cartoon/daffyduck1.wav';
listOfWords['log'] = 'http://www.wav-sounds.com/cartoon/hankhill1.wav';
listOfWords['pan'] = 'http://www.wav-sounds.com/cartoon/bugsbunny1.wav';
listOfWords['can'] = 'http://www.wav-sounds.com/cartoon/familyguy2.wav';
listOfWords['man'] = 'http://www.wav-sounds.com/cartoon/porkypig1.wav';
listOfWords['pin'] = 'http://www.wav-sounds.com/cartoon/daffyduck1.wav';
listOfWords['gag'] = 'http://www.wav-sounds.com/cartoon/hankhill1.wav';
listOfWords['sat'] = 'http://www.wav-sounds.com/cartoon/bugsbunny1.wav';
listOfWords['pat'] = 'http://www.wav-sounds.com/cartoon/familyguy2.wav';
listOfWords['tap'] = 'http://www.wav-sounds.com/cartoon/porkypig1.wav';
listOfWords['sap'] = 'http://www.wav-sounds.com/cartoon/daffyduck1.wav';
listOfWords['tag'] = 'http://www.wav-sounds.com/cartoon/hankhill1.wav';
listOfWords['gig'] = 'http://www.wav-sounds.com/cartoon/bugsbunny1.wav';
listOfWords['gap'] = 'http://www.wav-sounds.com/cartoon/familyguy2.wav';
listOfWords['nag'] = 'http://www.wav-sounds.com/cartoon/porkypig1.wav';
listOfWords['sag'] = 'http://www.wav-sounds.com/cartoon/daffyduck1.wav';
listOfWords['gas'] = 'http://www.wav-sounds.com/cartoon/hankhill1.wav';
listOfWords['pig'] = 'http://www.wav-sounds.com/cartoon/bugsbunny1.wav';
listOfWords['dig'] = 'http://www.wav-sounds.com/cartoon/familyguy2.wav';
listOfWords['got'] = 'http://www.wav-sounds.com/cartoon/porkypig1.wav';
listOfWords['not'] = 'http://www.wav-sounds.com/cartoon/daffyduck1.wav';
listOfWords['top'] =...