Is it possible to link two jquery.ui draggables together?

前端 未结 5 1751
生来不讨喜
生来不讨喜 2020-12-18 05:07

I have two jquery.ui draggables. I am constraining their movement to the y-axis. If one is dragged to a certain y-position, I want the other to automatically move to the s

5条回答
  •  -上瘾入骨i
    2020-12-18 05:47

    You would have to explicitly set the Y-Axis of both the elements.

    For this either in the event handler functions of both the elements you will have to set Y-Axis or bind both the elements with same function.

    Happy coding.

提交回复
热议问题