开发者

jQuery Draggable Area (to drag with, not in)

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜