Hi Luke,

You can pass Effects objects in to the drag/drop options argument, named 
starteffect and endeffect. By default, these set/unset opacity to 50% over 
2/10 second, but you could use these to change color, apply a CSS class, or 
whatever. The options can be used in both the low-level Draggables and in the 
Sortable.

HTH

Dave

On Thursday 17 May 2007 10:24, lukemack wrote:
> hi. i've created some drag and drop functionality for re-ordering a
> top-ten of items in a mysql database from php. this works fine but i
> want to make the item being dragged a different colour. i've tried the
> ghosting option but this isnt giving me enough contrast. i'm using
> Sortaable.create in scriptaculous. anyone know how to do this? So far
> I have:
>
> <script type="text/javascript">
>   Sortable.create('item_list', {constraint:'vertical',onUpdate :
> updateOrder, ghosting:true, handle: 'dragger'});
>
>   function updateOrder(){
>   var options = {
>     method : 'post',
>     parameters : Sortable.serialize('item_list')
>   };
> new Ajax.Request('/toptens/update', options);
>
> }
>
>
> function refresh() {
>
>       window.location.reload( true );
> }
> </script>
>
> I have tried using onChange and hoverclass but could not get this to
> work.
>
> any ideas?
>
> thanks,
>
> lukemack.
>
>
> >
>
> --
> This email has been verified as Virus free
> Virus Protection and more available at http://www.plus.net

-- 
----------------------
Author
Ajax in Action http://manning.com/crane
Ajax in Practice http://manning.com/crane2
Prototype & Scriptaculous in Action http://manning.com/crane3

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to