02.06.2013 Views

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

moz: "-moz-transform",<br />

webkit: "-webkit-transform",<br />

op: "-o-transform"<br />

};<br />

for (props in vendorStrings) {<br />

if(img.css(vendorStrings[props]) === "none") {<br />

prefix = vendorStrings[props];<br />

}<br />

}<br />

if (prefix === null) {<br />

prefix = "filter";<br />

}<br />

img.css({<br />

position: "absolute",<br />

filter: "progid:DXImageTransform.Micros<strong>of</strong>t.Matrix(<br />

sizingMethod='auto expand');"<br />

});<br />

return prefix;<br />

},<br />

vendor = getVendor();<br />

function doRotate() {<br />

rotateStrings[1]++;<br />

if (vendor === "filter") {<br />

var rad = rotateStrings[1] * (Math.PI * 2 / 360),<br />

cos = Math.cos(rad),<br />

sin = Math.sin(rad),<br />

driftX = (img.width() - origWidth) / 2,<br />

driftY = (img.height() - origHeight) / 2,<br />

el = img.get(0);<br />

img.css({<br />

left: <strong>of</strong>fset.left - driftX,<br />

top: <strong>of</strong>fset.top - driftY<br />

});<br />

el.filters.item("DXImageTransform.Micros<strong>of</strong>t.Matrix")<br />

.M11 = cos;<br />

[ 243 ]<br />

Chapter 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!