I'm trying to use Gridster, the jQuery Drag & Drop library. However, my HTML has a structure as in this JSFiddle ( http://jsfiddle.net/twashing/4xc6s/5/ ). And I can't get gridster to work. Ie, drag & drop behaviour doesn't happen.
My HTML structure has divs, not list items in an unordered list (ul > li). i) It's the .section-box classes that I want to make draggable, and replace with one another. How can I do this with Gridster?
ii) Barring that, I can even make the table row ( tr ) element, the draggable thing, if that's possible.
JSFiddle: http://jsfiddle.net/twashing/4xc6s/5/
HTML
<tbody>
<tr style="" class="ready">
<td style="position: relative;">
<div class="edit-section" style="">Planet of the Apes</div>
</td>
</tr>
<tr data-id="15AE995E-2630-A314-81EB-DB1C46F147F4" style="" class="ready">
<td style="position: relative;">
<div class="section-box grid-top-row" data-id="1" data-row="1" data-col="1" >
<div class="section-box-overlay" >1</div>
</div>
</td>
</tr>
<tr class="vertical-line ready" style="">
<td style="position: relative;">
<div class="vertical-line-left"></div>
<div class="vertical-line-right"></div>
</td>
</tr>
<tr data-id="CE29FFE8-4A61-CE84-0137-E2464705C588" style="" class="ready">
<td style="position: relative;">
<div class="section-box" data-id="2" data-row="2" data-col="1" >
<div class="section-box-overlay" >2</div>
</div>
</td>
</tr>
<tr class="vertical-line ready" style="">
<td style="position: relative;">
<div class="vertical-line-left"></div>
<div class="vertical-line-right"></div>
</td>
</tr>
<tr style="" class="ready">
<td style="position: relative;">
<div class="section-box-add">
<div class="section-box-add-label"></div>
<div class="box-label" style="color: rgb(95, 95, 97);">Add a related screen
<br>to this section</div>
</div>
</td>
</tr>
</tbody>
Javasctipt
$(function() {
$("tbody > tr > td").gridster({
widget_margins: [5, 5]
})
});
Thanks