Can someone please help me with this one:
I am reposting this just in case people have missed it and or to see if UI Sortables is something beyond most people - so I apologise in advance: After considerable research on the BigG, posting here there and everywhere I am still no nearer finding or getting an answer or even seeing something I can understand. OK I admit I am quite at home with php, css, html etc but js/Jquery ummmm that is all new to me -. so I am always looking for things/explanations that I can understand. Sadly for JQuery it seems that 99% of the tutorials etc. out there are written in a way that I cannot understand. Based on on posts in other forums etc I know I am not alone we are looking for a "dummies" Please do not say look at "help" items like http://jqueryui.com/demos/sortable/#event-update - http://jqueryui.com/demos/sortable/#method-toArray - http://jqueryui.com/demos/sortable/#method-serialize as they are not help items to people like me. As I have said in other posts they are "martian".
When using UISortables where - and how do I put "serialize" into the JQuery function?
I have 4 columns class '.columm' and each with a unique id - col1,col2,col3 & col4 -like this.
<div class="column" id="col1(to col4)">
Feeds
Lorem ipsum dolor sit amet, consectetuer adipiscing elit
Feeds
Lorem ipsum dolor sit amet, consectetuer adipiscing elit
I can get the drag & drop bit to work I now need to put the "final" positions into a serialized array.
Here is my code:
$(".column").sortable({
revert: true,
scroll: true,
appendTo: 'body',
connectWith: '.column',
delay:200,
stop: function() {
$(".column").each(function(){
var test = $(this).attr('id');
alert(test);
//
//var myArray = $(this).sortable("serialize");
})
},
revertDuration:50000,
scope:'scope',
opacity: 0.80,
});
You will see alert test. I have done this to see if I can get the col id's into an alert and I can, but where do i put
.sortable( "serialize" , [options] ) and how do I do that for the 4 columns to create 1 single serialized array?
having done that how/where do you set the order when you next load the page? (OK yes, I do intent to "store" the serialized array)
Help please - thanks