jQuery draggable with handler outside the drag el (which moves)

744 Views Asked by At

I am using the draggable UI jquery plugin to simulate movement in a map or a "touchcreen" or whatever. In fact I have what I want did with mootools in this link: http://bloodblog.net/test/cabocity/main.html (Chrome, chrommium and ¿old? firefox only).

It contains this:

html:

<div id="touchpad" ></div>
<div id="cont"><!-- here a lot of things --></div>

The handler here is the touchpap. It is on top and it doesn't move never. It moves, when drag, the cont element.

I am trying to do the same in jquery but when I use the "handler" option of the draggable ui-jquery plugin doesn't happen nothing: it is not nested of the drag element.

Here is the doc of the jquery plugin: http://jqueryui.com/demos/draggable/#handle


Here is the structure in mootools: comment#4 but i wanna make it in jquery: (comment #2)/ but it doesn't work because touchpad isn't nested too container div. Here is when container is over all: (comment #3) (this work, but doesn't a solution because you can only drag over red background).

PS: sorry for the links, i can't post all of them.

0

There are 0 best solutions below