jQuery UI Rotatable Plug-in

Other topics

Initial Usage Example

jquery-ui-rotatable is a plugin for jQuery UI that works in a similar way to Draggable and Resizable, without being as full-featured. By default, it puts a small rotation icon in the bottom left of whatever element you want to make rotatable.

<html>
  <head>
    <title>My Rotatable</title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
    <link rel="stylesheet" href="//cdn.jsdelivr.net/jquery.ui.rotatable/1.0.1/jquery.ui.rotatable.css">
    <script src="http://code.jquery.com/jquery-1.11.3.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <script src="//cdn.jsdelivr.net/jquery.ui.rotatable/1.0.1/jquery.ui.rotatable.min.js"></script>
    <script>
    $(function(){
      $('#target').rotatable();
    });
    </script>
  </head>
  <body>
  <div id="target">Rotate me!</div>
  </body>
</html>

Parameters:

ParameterDetails
handleurl to a custom image for the handle
anglethe starting rotation for the element.
rotationCenterXposition about which the element will be rotated
rotationCenterYposition about which the element will be rotated
stepan angle in degrees that the rotation will snap to if the shift key is held.
snapsnaps to step in degrees.
starttriggered when rotation starts
stoptriggered when rotation stops
rotatetriggered when object is being rotated
wheelRotateenable/disable mouse wheel to rotate element.

Contributors

Topic Id: 1806

Example Ids: 5900

This site is not affiliated with any of the contributors.