开发者

jQuery Draggable Area (to drag with, not in)

开发者 https://www.devze.com 2023-04-11 02:56 出处:网络
I\'m wondering how to drag around开发者_开发问答 a div (#container) using a different div (child div specifically #dragBar).Is there a parameter in the .draggable() function that could set a one div t

I'm wondering how to drag around开发者_开发问答 a div (#container) using a different div (child div specifically #dragBar). Is there a parameter in the .draggable() function that could set a one div to drag around another?

jQuery Draggable Area (to drag with, not in)


If I'm understanding your question correctly, try using the handle option; for example:

$("yourElement").draggable({"handle": "otherElement"});
0

精彩评论

暂无评论...
验证码 换一张
取 消