Advanced Touch-friendly Rotatable Plugin For jQuery UI - ui-rotatable

File Size: 10.8 KB
Views Total: 4012
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Advanced Touch-friendly Rotatable Plugin For jQuery UI - ui-rotatable

An advanced and performant rotatable plugin for jQuery UI that makes use of CSS3 2D transforms to rotate an element with handle, mousewheel and touch events.

How to use it:

1. Load the necessary jQuery and jQuery UI in the document.

<link rel="stylesheet" href="">
<script src=""
<script src=""></script>

2. Load the jqueryui-touch-punch library to enable the support of touch events (OPTIONAL).

<script src=""></script>

3. Download and load the jQuery ui-rotatable plugin after jQuery & jQuery UI libraries.

<script src="jquery.ui.rotatable.js"></script>

4. Enable the rotatable functionality on an element you specify.

<div class="box">

5. You can also chain together other jQuery UI widgets such as draggable, resizable, etc.


6. Apply your own CSS styles to the rotate handle.

.ui-rotatable {
  /* styles here */

.ui-rotatable-rotating {
  /* styles here */

.ui-rotatable-handle {
  /* styles here */

7. Possible options to customize the plugin.

  classes: {},
  create: null,
  distance: 1,
  delay: 0,
  disabled: false,
  alsoRotate: false,
  angle: 0, // 0-360
  handle: true,
  handleElementSelector: '<div></div>',
  rotationOriginPosition: {
    top: null,
    left: null
  snap: false,
  snapStep: 22.5,
  wheel: true, // mousewheel
  wheelingVerticalStep: null,
  wheelingHorizontalStep: null

8. Available callback functions.


  // when rotation starts
  start: function (event, ui) { return true; },

  // while rotating
  rotate: function (event, ui) { return true; },

  // when rotation stops
  stop: function (event, ui) { return true; }

This awesome jQuery plugin is developed by abdullahpazarbasi. For more Advanced Usages, please check the demo page or visit the official website.