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.

matrix[1] = 0.7;<br />

matrix[3] = -30 * oneRad;<br />

matrix[5] = -10 * oneRad;<br />

matrix[7] = 0.7;<br />

matrix[9] = (vendor === "-moz-transform") ? "90px," : "90,";<br />

matrix[10] = (vendor === "-moz-transform") ? "-30px)" : "-30)";<br />

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

el.addClass("skew-right").css(vendor,<br />

matrix.join("")).css("z<strong>Index</strong>", order);<br />

} else {<br />

el.addClass("skew-right").css(vendor, msMatrix).css({<br />

z<strong>Index</strong>: order,<br />

top: -30,<br />

left: 270,<br />

width: 140,<br />

height: 140,<br />

marginLeft: -100<br />

});<br />

}<br />

});<br />

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

.M11 = 1;<br />

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

.M12 = matrix[5];<br />

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

.M21 = matrix[3];<br />

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

.M22 = 1;<br />

order--;<br />

matrix[3] = 0;<br />

matrix[5] = 0;<br />

[ 251 ]<br />

Chapter 9<br />

What just happened?<br />

In the first part <strong>of</strong> the script we initialize our variables. If you've wondered why we always<br />

initialize our variables at the top <strong>of</strong> functions, the reason is because <strong>of</strong> a phenomenon<br />

called Hoisting. This is where variables initialized in functions get "hoisted" to the top <strong>of</strong><br />

the function and can contain results that we aren't expecting.

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

Saved successfully!

Ooh no, something went wrong!