When applying a relative rotation to a jQuery set that has more than one item, the relative rotation applied to each item is not the correct value. Instead, the rotation applied is the relative value times the number of items.
For example: if there are two items in $set, then the following code will apply a '+=50deg' rotation:
When applying a relative rotation to a jQuery set that has more than one item, the relative rotation applied to each item is not the correct value. Instead, the rotation applied is the relative value times the number of items.
For example: if there are two items in
$set
, then the following code will apply a'+=50deg'
rotation:But, this code will work correctly:
The jQuery css equivalent will apply only a 25 degree rotation:
Here is a jsFiddle demo: http://jsfiddle.net/KfhqU/