Hi Everyone,

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

For my Base, I am using this sortables example:


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:


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

	function () {
		$('a.closeEl').bind('click', toggleContent);
		$('div.pHeader').bind('dblclick', toggleContent);
		$('div.pHeader').bind('ondrop', reportPosition);
				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()

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

	if (targetContent.css('display') == 'none') {
		state = 'expanded';
	} else {
		state = 'collapsed';

	// 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?