public
Description: Interaction Service Plugin for chain.js
Home | Edit | New

Demo: Simple Sortable

Demos > Simple Sortable Example

First Last

Source

<div id="persons">
	<div class="item"><span class="first">First</span> <span class="last">Last</span></div>
</div>
<input type="button" value="Get First Item" onclick="get()" />
$('#persons')
	.items([
		{first:'Isaac', last:'Newton'},
		{first:'Johannes', last:'Keppler'},
		{first:'Alessandro', last:'Volta'},
		{first:'Blaise', last:'Pascal'}
	])
	.sortable()
	.chain();
function get()
{
	var data = $('#person').items(0).item();
	alert(data.last+', '+data.first);
}
Last edited by raid-ox, Tue Sep 16 09:14:19 -0700 2008
Home | Edit | New
Versions: