Hi Everyone,

So I am using Jquery and attempting to clean up my "sortables" code.

For my Base, I am using this sortables example:

http://interface.eyecon.ro/demos/sort.html

I am aware it is using an older version of Jquery, and so I am seeking help from anyone here who may know a thing or two about Jquery to let me know what is considered outdated and what is considered good.

My "config.js" code is located here:

http://pastie.caboo.se/115218

But here is the same code:
Code:
var url = 'savePallet.action';

$(document).ready(
	function () {
		$('a.closeEl').bind('click', toggleContent);
		$('div.pHeader').bind('dblclick', toggleContent);
		$('div.pHeader').bind('ondrop', reportPosition);
		$('div.pGroup').Sortable(
			{
				accept: 'pShadow',
				helperclass: 'sortHelper',
				activeclass: 'sortableactive',
				hoverclass: 'sortablehover',
				handle: 'div.pHeader',
				opacity: 0.6,
				tolerance: 'pointer',
				onChange : function()
				{
					$.post(url + '?' + $.SortSerialize().hash);
				},
				onStart : function()
				{
					$.iAutoscroller.start(this, document.getElementsByTagName('body'));
				},
				onStop : function()
				{
					$.iAutoscroller.stop();
				}
			}
		);
	}
);

var toggleContent = function(e)
{
	var state = '';
	var targetContent = $('div.pContent', this.parentNode.parentNode.parentNode);

	if (targetContent.css('display') == 'none') {
		state = 'expanded';
		targetContent.toggle();
		$(this).addClass('itemOpen');
		$(this).removeClass('itemClose');
	} else {
		state = 'collapsed';
		targetContent.toggle();
		$(this).addClass('itemClose');
		$(this).removeClass('itemOpen');
	}

	// Notify server of state change
	$.post(url, {'state':state,'id':$(this).parent('div').parent('div').attr('id')});
	return false;
};

var reportPosition = function(e)
{
	$.post(url, {'test':'1', 'id':$(this).attr('id')});
	return false;
};
A few people have informed me to try using the latest code from stuff at http://ui.jquery.com, but the problem is...I don't even know where to start.

Any help with my existing code?

Thanks,
Bryan