jQuery.Drag.prototype.step  function     

plugin: jquery/event/drag/step

makes the drag move in steps of amount pixels.

drag.step({x: 5}, $('foo'), "xy")

Demo

drag.step(amount, container, center) -> jQuery.Drag
{number|Object}

make the drag move X amount in pixels from the top-left of container.

{optional:jQuery}

the container to move in reference to. If not provided, the document is used.

{optional:String}

Indicates how to position the drag element in relationship to the container.

  • If nothing is provided, places the top left corner of the drag element at 'amount' intervals from the top left corner of the container.
  • If 'x' is provided, it centers the element horizontally on the top-left corner.
  • If 'y' is provided, it centers the element vertically on the top-left corner of the container.
  • If 'xy' is provided, it centers the element on the top-left corner of the container.
{jQuery.Drag}

the drag object for chaining.

© Jupiter IT - JavaScriptMVC Training and Support