Hi,
I try to used the drag and drop but I have problem to understand.
How use the notify function ?
<div id="drag_demo_1"style="width:130px; height:20px;
cursor:move;
border:1px solid #333; "></div>
<script type="text/javascript">
new Draggable(''drag_demo_1'',{snap:[130,59]});
Draggables.notify(''drag_demo_1'',''1'',''onEnd'');
</script>
Or maybye someone have a simple example ?
Can you help me ?
Thank you !
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
You''re probably not interested in calling notify() directly. What you
want
to do is call addObserver() because scriptaculous calls notify internally as
drag events take place:
var drag1 = new Draggable(''drag_demo_1'', { /* your options go
here */ });
Draggables.addObserver({
onEnd: function(eventName, draggable, event) {
/* do something with the drag event and draggable object here */
alert(draggable.element); // what element was dragged?
});
-Fred
On Fri, Jun 13, 2008 at 10:51 AM, Toss
<christophe.peugnet-bQ37owXtUZ/by3iVrkZq2A@public.gmane.org>
wrote:
>
> Hi,
> I try to used the drag and drop but I have problem to understand.
> How use the notify function ?
>
>
> <div id="drag_demo_1"style="width:130px; height:20px;
cursor:move;
> border:1px solid #333; "></div>
> <script type="text/javascript">
> new Draggable(''drag_demo_1'',{snap:[130,59]});
>
Draggables.notify(''drag_demo_1'',''1'',''onEnd'');
> </script>
--
Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Hi Fred ! Many thanks !!! On 19 juin, 04:17, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:> You''re probably not interested in calling notify() directly. What you want > to do is call addObserver() because scriptaculous calls notify internally as > drag events take place: > > var drag1 = new Draggable(''drag_demo_1'', { /* your options go here */ }); > Draggables.addObserver({ > onEnd: function(eventName, draggable, event) { > /* do something with the drag event and draggable object here */ > alert(draggable.element); // what element was dragged? > }); > > -Fred > > On Fri, Jun 13, 2008 at 10:51 AM, Toss <christophe.peug...-bQ37owXtUZ/by3iVrkZq2A@public.gmane.org> > wrote: > > > > > Hi, > > I try to used the drag and drop but I have problem to understand. > > How use the notify function ? > > > <div id="drag_demo_1"style="width:130px; height:20px; cursor:move; > > border:1px solid #333; "></div> > > <script type="text/javascript"> > > new Draggable(''drag_demo_1'',{snap:[130,59]}); > > Draggables.notify(''drag_demo_1'',''1'',''onEnd''); > > </script> > > -- > Science answers questions; philosophy questions answers.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---