Hi mex
This is not really a cake question, as $ajax->drag is actually a
wrapper of scriptaculous' Draggable object :
http://github.com/madrobby/scriptaculous/wikis/draggable
The "handle" option is what you're looking for. It'll give you something like :
$ajax->drag("div_id",array("handle"=>"heading_id"));
which will produce javascript code close to this:
new Draggable("div_id",{"handle":"heading_id"});
I personnally prefer to do it in plain javascript than the Cake way,
because it allows you to use selectors rather than dom ids, like:
new Draggable("div_id",{"handle":$("div_id").select("[name=heading]")[0]});
Then you can do a generic function to apply to all the divs you want
to make draggable:
function setDraggable(div){
new Draggable($(div),{"handle":$(div).select("[name=heading]")[0]});
}
setDraggable("window1");
setDraggable("window2");
++++++
Clément
On Fri, Aug 22, 2008 at 2:08 PM, meximex <[EMAIL PROTECTED]> wrote:
>
> hi have a draggable div. a main layout with a smaller scrollable area.
> i just want to enable the dragging of the "window-layer" if the
> heading is dragged. same like in windows.
>
> how can i do that?
>
> thx for your help.
> mex
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---