oBo
oBo

Reputation: 992

Draggable div Jquery UI

I want to be able to drag the main wrapper by pushing the header div.

The main wrapper div that i want to drag is #popupContact

The header div is called #popupHeaderGradient.

Now im using Jquery UI and I got it to work with $('#popupHeaderGradient').draggable();

But this only allows me to move the header element.

I want it to drag the whole main wrapper by dragging on the header element.

Upvotes: 0

Views: 135

Answers (2)

Lee
Lee

Reputation: 10603

use the handle option to tell jquery what you want to use as the "drag handle"

$('#popupContact').draggable({
   handle: '#popupHeaderGradient'
});

Upvotes: 1

nemo
nemo

Reputation: 1685

$('#popupContact').draggable({handle: "#popupHeaderGradient"});

Upvotes: 2

Related Questions