Reputation: 67240
I've created a draggable div that works great, looks like this:
<div id="outerdiv">
<div id="titlediv">Some Text</div>
<div id="rowdiv">Some more text</div>
<div id="rowdiv">Some more text</div>
</div>
in jQueryUI linked it up:
$('#outerdiv').draggable();
What I want, however, is to make the '#titlediv' draggable so that only when you click on that part can you drag the outer div.
i.e. first line inside the div is the title which when dragged will cause the whole div to drag.
Upvotes: 1
Views: 626
Reputation: 262919
You can use the handle option:
$("#outerdiv").draggable({
handle: "#titlediv"
});
Upvotes: 3