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 <[EMAIL PROTECTED]>
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@googlegroups.com
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