Found this nice little script but it was designed for 3 colums heres the JS:
[code]
function serialize()
{
serial = $.SortSerialize();
var now = new Date();
now.setTime(now.getTime() + 1000 * 60 * 60 * 24 * 365);
var serialhash = serial.hash;
var serialhash = serialhash.replace(/=/g, “:”);
var serialhash = serial.hash;
var serialhash = serialhash.replace(/=/g, “:”);
var serialhash = serialhash.replace(/statusModule/, “0”);
var serialhash = serialhash.replace(/commentsModule/, “1”);
var serialhash = serialhash.replace(/LatestBP/, “2”);
var serialhash = serialhash.replace(/PMModule/, “5”);
var serialhash = serialhash.replace(/QBPModule/, “6”);
var serialhash = serialhash.replace(/imageModule/, “7”);
var serialhash = serialhash.replace(/&/g, “#”);
var serialhash = serialhash.replace(/sort1/, “0”);
var serialhash = serialhash.replace(/sort1/g, “”);
var serialhash = serialhash.replace(/sort2/, “1”);
var serialhash = serialhash.replace(/sort2/g, “”);
var serialhash = serialhash.replace(/[[]]/g, “”);
var serialhash = serialhash.replace(/#:/g, “:”);
var serialhash = serialhash.replace(/#/g, “:#”);
var serialhash2 = “:#”;
var serialhash = serialhash + serialhash2;
document.cookie = “hporderwrap=”+ serialhash +”;expires=” + now;
};
/* REordering the divs */
function zxcDragInit(zxcevt,zxccls){
var zxcparary=zxcElsByClass(zxccls[0],false,’DIV’);
for (var zxcnu=0,zxcdivs,zxcdivary=[],zxcparary=zxcElsByClass(zxccls[0],false,’DIV’),zxctitle,zxc0=0;zxc0<zxcparary.length;zxc0++){
zxcdivs=zxcElsByClass(zxccls[1],zxcparary[zxc0],’DIV’);
for (var zxc0a=0;zxc0a<zxcdivs.length;zxc0a++){
zxcdivary.push(zxcdivs[zxc0a]);
zxcdivs[zxc0a].nu=(zxcnu++)+”;
}
}
if (zxcReadCookie(zxccls[0])){
var zxccookievalue=zxcReadCookie(zxccls[0]);
zxccookievalue=zxccookievalue.split(‘#’)
for (var zxcp,zxcs,zxc1=0;zxc1<zxccookievalue.length-1;zxc1++){
zxcs=zxccookievalue[zxc1].split(‘:’);
zxcp=zxcparary[zxcs[0]];
for (var zxc1a=1;zxc1a<zxcs.length-1;zxc1a++){
zxcp.appendChild(zxcdivary[zxcs[zxc1a]]);
}
}
}
}
function zxcEventAdd(zxco,zxct,zxcf,zxcp) {
if ( zxco.addEventListener ){ zxco.addEventListener(zxct, function(e){ return zxco[zxcf](e,zxcp);}, false); }
else if ( zxco.attachEvent ){ zxco.attachEvent(‘on’+zxct,function(e){ return zxco[zxcf](e,zxcp); }); }
else {
var zxcPrev=zxco[“on” + zxct];
if (zxcPrev){ zxco[‘on’+zxct]=function(e){ zxcPrev(e); zxco[zxcf](e,zxcp); }; }
else { zxco[‘on’+zxct]=zxco[zxcf]; }
}
}
function zxAddEvt(obj, fun,ev, p)
{
if (obj[‘zxc’]) return;
obj[‘zxc’+fun+ev])
}
function zxcElsByClass(zxccls,zxcp,zxctag) {
zxcp=zxcp||document;
zxcp=typeof(zxcp)==’object’?zxcp:document.getElementById(zxcp);
zxctag=zxctag||’*’;
for (var zxcels=zxcp.getElementsByTagName(zxctag),zxcreg=new RegExp(‘\b’+zxccls+’\b’),zxcary=[],zxc0=0;zxc0<zxcels.length;zxc0++){
if (zxcreg.test(zxcels[zxc0].className)) zxcary.push(zxcels[zxc0]);
}
return zxcary;
}
function zxcReadCookie(zxcnme){
zxcnme+=’=’;
var zxcsplit = document.cookie.split(‘;’);
for(var zxc0=0;zxc0<zxcsplit.length;zxc0++) {
var zxcs=zxcsplit[zxc0];
while (zxcs.charAt(0)==’ ‘) zxcs=zxcs.substring(1,zxcs.length);
if (zxcs.indexOf(zxcnme)==0) return zxcs.substring(zxcnme.length,zxcs.length);
}
return null;
}
zxcAddEvt(window,’zxcDragInit’,’load’,[‘hporderwrap’,’groupItem’,’itemHeader’,1]);
// Delete Cookie
function deletecookiecity() {
var zxcsplit = document.cookie.split(‘;’);
var now = new Date();
now.setTime(now.getTime() – 1000 * 60 * 60 * 24 * 365)
document.cookie = “hporderwrap=”+ zxcsplit +”;expires=” + now;
window.location.reload();
}
// onpage load
$(document).ready(
function () {
$(‘#settingBox’).hide();
$(‘.closeArea’).bind(‘click’, toggleContent);
<?php
for ($turn = 0; $turn < sizeof($menuSide); $turn++)
{
$using = $menuSide[$turn];
if ($using == 0)
$sOh = “hide”;
else
$sOh = “show”;
echo “$(‘.mylist” . $turn . “‘).” . $sOh . “();n”;
}
?>
$(‘div.hporderwrap’).Sortable(
{
accept: ‘groupItem’,
helperclass: ‘sortHelper’,
activeclass : ‘sortableactive’,
hoverclass : ‘sortablehover’,
handle: ‘div.itemHeader’,
tolerance: ‘pointer’,
scroll: false,
onChange : function(ser)
{
},
onStart : function()
{
$.iAutoscroller.start(this, document.getElementsByTagName(‘body’));
},
onStop : function()
{
$.iAutoscroller.stop();
}
}
);
}
);
and the HTML:
[code]
<div id=”sort1″ class=”hporderwrap”>
<div id=”statusModule” class=”groupItem”>
<div style=”-moz-user-select: none;” class=”itemHeader” onmouseup=”setTimeout(‘serialize();’, 1*1000); return false;”>
Status <div class=”closeArea”></div>
</div>
<div class=”postshown itemContent”>
sdf
</div>
</div>
<div id=”commentsModule” class=”groupItem”>
<div style=”-moz-user-select: none;” class=”itemHeader” onmouseup=”setTimeout(‘serialize();’, 1*1000); return false;”>
Comments<div class=”closeArea”></div>
</div>
<div class=”postshown itemContent”>
sdf
</div>
</div>
<div id=”LatestBP” class=”groupItem”>
<div style=”-moz-user-select: none;” class=”itemHeader” onmouseup=”setTimeout(‘serialize();’, 1*1000); return false;”>
Latest Blog Posts<div class=”closeArea”></div>
</div>
<div class=”postshown itemContent”>
sdf
</div>
</div>
</div>
<div id=”sort2″ class=”hporderwrap”>
<div id=”PMModule” class=”groupItem”>
<div style=”-moz-user-select: none;” class=”itemHeader” onmouseup=”setTimeout(‘serialize();’, 1*1000); return false;”>
Private Messages<div class=”closeArea”></div>
</div>
<div class=”postshown itemContent”>
sdf
</div>
</div>
<div id=”QBPModule” class=”groupItem”>
<div style=”-moz-user-select: none;” class=”itemHeader” onmouseup=”setTimeout(‘serialize();’, 1*1000); return false;”>
Quick-Step Blog Post<div class=”closeArea”></div>
</div>
<div class=”postshown itemContent”>
sdf
</div>
</div>
<div id=”imageModule” class=”groupItem”>
<div style=”-moz-user-select: none;” class=”itemHeader” onmouseup=”setTimeout(‘serialize();’, 1*1000); return false;”>
Image Upload<div class=”closeArea”></div>
</div>
<div class=”postshown itemContent”>
sdf
</div>
</div>
</div>
The problem is that only the first coloum saves, if I move any modules in the second colum it doesnt save.
Any help ? ?
Thanks