[jQuery] Intfac Sotabls estion

2006-10-12 Thread Nathan Smith



	

	http://host.sonspring.com/dragdrop/

^ See here for example.

I am wondering if / how to use the Interface elements for jQuery to make the list item labeled "Company" able to be draggable / droppable, but only within its containing column.
	


 m2f 

Permalink to this post:
http://proj.jquery.com/forum/viewtopic.php?p=9536#9536

 m2f 
	

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Intfac Sotabls estion

2006-10-12 Thread Webunity | Gilles van den Hoven
Nathan Smith wrote:
 http://host.sonspring.com/dragdrop/

Hi Nathan!

Change your javascript code to this and try again!

$(document).ready(
function () {
// Save options
hshOptions = {
accept: 'sortableitem',
activeclass: 'background',
hoverclass: 'background',
helperclass: 'placeholder',
opacity: 0.6,
fx:200,
revert:true,
tolerance: 'pointer'
}

// Create first sortable, with above options
$('ul#sort1').Sortable(hshOptions);
   
// Create second sortable, with above options, but with 
containment on
hshOptions.containment = 'parent';
$('ul#sort2').Sortable(hshOptions);
}
);

p.s. you could also create 2 hashes for the options, but since you reuse 
almost all options this seemed the best choice.

Good luck,
Gilles!

p.s. check the docs at: http://interface.eyecon.ro/docs/sort

for more options

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/