My favorites | Sign in
Project Logo
                
Show all Featured downloads:
jquery.rotate.1-1.js
Show all Featured wiki pages:
Reference
Feeds:
People details
Project owners:
  tjerk.meesters

Introduction

This library is an extension for jQuery to rotate images directly within JavaScript. Good in situations where you want to organize your thumbnails without the lag of synchronous image operations via the web server.

Implementation

Two JavaScript image handling implementations are supported:

  1. using DXImageTransform filter for Microsoft Internet Explorer
  2. using Canvas object for other browsers

The library has been tested with:

Functions

.rotate(angle,[whence=relative])

.rotateLeft([angle=90])

.rotateRight([angle=90])

Guide

The library should be loaded after the jquery.js. Once the library is loaded, you can rotate images by calling rotateLeft([angle=90]) or rotateRight([angle=90]) on the jQuery object, like this:

$('#theimage').rotateLeft();

From version 1.1, this library also supports arbitrary angles, in degrees:

$('#theimage').rotateRight(45);

Notes









Hosted by Google Code