Sha256: 945520ebf62e4c4ef1d068d79e20455db789c6a1dcb07114aed852ef8dfc4e21
Contents?: true
Size: 418 Bytes
Versions: 5
Compression:
Stored size: 418 Bytes
Contents
$(document).ready(function() { var updateContentsOrder = function() { var list = $('ul#contents-list.sortable'); var ids = jQuery.map(list.sortable('toArray'), function(e) { return e.match(/content-(\w+)/)[1]; }).join(','); $('#order').val(ids || ''); } $('ul#contents-list.sortable').sortable({ handle: 'em', items: 'li.content', stop: function(event, ui) { updateContentsOrder(); } }); });
Version data entries
5 entries across 5 versions & 1 rubygems