<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Serialize function for Mootools Sortables</title>
	<link>http://techblog.billkrueger.com/2006/11/09/serialize-function-for-mootools-sortables/</link>
	<description>A place to share thoughts and ideas on new or emerging web technologies</description>
	<pubDate>Mon, 08 Sep 2008 17:45:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.1</generator>

	<item>
		<title>by: David B.</title>
		<link>http://techblog.billkrueger.com/2006/11/09/serialize-function-for-mootools-sortables/#comment-275</link>
		<pubDate>Wed, 19 Sep 2007 19:00:22 +0000</pubDate>
		<guid>http://techblog.billkrueger.com/2006/11/09/serialize-function-for-mootools-sortables/#comment-275</guid>
					<description>The current mootools does have a serialize function now. finding tutorials to get this function to return a serialized version of the ID's and not a set of numbers 0-(#elements to sort) was a bit difficult though.

in my code I used a table to sort.

var mySort = new Sortables($('table'), {
	onComplete: function() {
		alert(this.serialize(function(el) {
			return el.id;
		}));
	}
});

then after you sort your 'table' this will return a comma separated string of the id's you had in your tr tags of your table.

This is rather basic, but it took me a while to figure out the basic syntax of this.</description>
		<content:encoded><![CDATA[<p>The current mootools does have a serialize function now. finding tutorials to get this function to return a serialized version of the ID&#8217;s and not a set of numbers 0-(#elements to sort) was a bit difficult though.</p>
<p>in my code I used a table to sort.</p>
<p>var mySort = new Sortables($(&#8217;table&#8217;), {<br />
	onComplete: function() {<br />
		alert(this.serialize(function(el) {<br />
			return el.id;<br />
		}));<br />
	}<br />
});</p>
<p>then after you sort your &#8216;table&#8217; this will return a comma separated string of the id&#8217;s you had in your tr tags of your table.</p>
<p>This is rather basic, but it took me a while to figure out the basic syntax of this.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
