forked from zachstronaut/jquery-animate-css-rotate-scale
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
56 lines (44 loc) · 1.74 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
-----------------------------
READ ME
-----------------------------
jquery-animate-css-rotate-scale
Zachary Johnson
www.zachstronaut.com
This monkey patch for jQuery 1.3.1+ allows you to:
1. Get and set rotate and scale CSS transforms independently with the added
custom jQuery methods rotate() and scale().
Examples:
$('#example').rotate('30deg');
$('#example').scale(1.5);
$('#example').rotate('45deg');
$('#example').translateX(150);
$('#example').translateY(150);
$('#example').rotate(); // returns '45deg'
$('#example').scale(); // returns '1.5'
$('#example').translateX(); // returns '150px'
$('#example').translateY(); // returns '150px'
2. Animate rotate and scale CSS transforms independently using jQuery's
animate() method.
Examples:
$('#example').animate({rotate: '30deg', scale: '1.25'}, 1000);
$('#example').animate({rotate: '+=30deg', scale: '-=0.1'}, 1000);
Browser Support
---------------
The CSS transform property and therefore this patch currently function in
Webkit/Safari/Chome and Firefox 3.5.
Using This Patch
----------------
Load jquery-animate-css-rotate-scale.js after loading jQuery and
jquery-css-transform.js. For example:
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery-css-transform.js" type="text/javascript"></script>
<script src="jquery-animate-css-rotate-scale.js" type="text/javascript"></script>
For more information visit:
http://www.zachstronaut.com/
This code is currently available for use in all personal or commercial projects
under both MIT and GPL licenses, just like jQuery.
-----------------------------
Change Log
-----------------------------
2009.12.30 - Added (partial) support for translateX and translateY
2009.07.15 - Added to GitHub