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 !
on 2008-06-13 17:52
on 2008-06-19 04:17
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@sodeasoft.com>
wrote:
> Draggables.notify('drag_demo_1','1','onEnd');
> </script>
--
Science answers questions; philosophy questions answers.