bebraw
10/17/2010 - 8:18 AM

layers.js

<ul class="layers">
<li><div class="toggleVisibility">Visibility toggle</div><div class="layerName">Layer name</div></li>
<li><div class="toggleVisibility">Visibility toggle</div><div class="layerName">Layer name</div></li>
<li><div class="toggleVisibility">Visibility toggle</div><div class="layerName">Layer name</div></li>
</ul>
new Sortable('layers');

// XXX: this won't get triggered because parent is Sortable!
$('toggleVisibility').on('click', function() {
    // set layer hidden now
})