axis String(default: null)

Constrains the hint movement to either the horizontal (x) or vertical (y) axis. Can be set to either "x" or "y".

Example - initialize horizontally draggable element

<div id="draggable"></div>

    hint: function(element) {
      return element.clone();
    axis: "x"
  #draggable {
    width: 50px;
    height: 50px;
    background-color: orange;
    border: 2px solid green;
In this article
Not finding the help you need? Improve this article