i have been working on my carousel items. i need to have a sortable list views in order for me to choose the appropriate format of details in the actual site.
i was able to do the sortable items using this command in jquery
$(function() {
$("#subsortsortable tbody.content").sortable();
$("#subsortsortable tbody.content").disableSelection();
$("tbody.subcontent").sortable();
$(开发者_StackOverflow社区"tbody.subcontent").disableSelection();
});
then i added another jquery ui 1.7.1 in the site master: http://www.wil-linssen.com/musings/entry/extending-the-jquery-sortable-with-ajax-mysql/
i need to save the sorted items i dragged so when i click the refresh button. the new sorted items will be displayed
thanks in advance
Here is what i do and works fine for me, i have a hidden field that i throw the values as comma separated string. Example:
$('#refresh').click(function() {
var items = $('#sortable').sortable('toArray');
$('#sortablevalues').val(items);
});
精彩评论