The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript I want to display jQuery sortable order from a cookie

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #39283
    Steven Gardner


    I have a jQuery sortable area where a user can move widgets to different positions in a grid style layout.
    I have managed to save the sort order to a cookie once the user is finished moving stuff around.

    I now want to set the display order to reflect the order in the cookie.

    All ideas would be much appreciated.

    	//Create MYAREA sortable widgets
    $( "#myarea" ).sortable({
    start: function( event, ui ) {
    // SET Cookie to save sortable order
    update:function(event, ui) {
    var order = $( "#myarea" ).sortable("toArray").join();
    stop: function( event, ui ) {
    $( "#myarea" ).disableSelection();

    So I have a cookie called MYAREAORDER with its value “#id1,#id2,#id3#id4…”

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.