Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI: Setting draggable options for the dialog

I have a draggable dialog and I would like to set dragging options, I don't know how to do it.

Here is an example. The red box has the option cursorAt set with { top: 0, left: 0 }. I would like to do the same with the dragging of the dialog.

like image 785
Diego Avatar asked Apr 18 '11 15:04

Diego


1 Answers

To change the dialog widget's draggable options, you can reference it like this:

$("#myDialog").dialog("widget").draggable("option", "cursorAt", { top: 0, left: 0 });

You can do the same with resizable as well.

like image 146
DarthJDG Avatar answered Sep 26 '22 18:09

DarthJDG