I am experiencing difficulties rearranging my sortable divs using jQuery. After moving the divs and saving their ID, top, and left positions, I retrieve data from a JSON file. However, when I try to move the divs back to their saved positions, I encounter issues. Here is my current code snippet:
$.getJSON("http://test.com/test", function( json) {
$.each( json, function( key, val ) {
$("#" + val.divname).animate({left: val.left+ "px"}, 1000);
});
}