Time for action – initializing the widget
The first thing we need to do is set up the images ready to have their skew manipulated. We can also add the function that will return the correct vendor-specific prefix for the transform style property that we used in the last example. In the empty function at the bottom of the HTML page, add the following code:
var viewer = $("#viewer"), flow = viewer.find("#flow"), order = flow.children().length, oneRad = 1 * (Math.PI / 180), matrix = ["matrix(", 1, ",", 0, ",", 0, ",", 1, ",","0px,", "0px)"], msMatrix = "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')", getVendor = function() { var prefix = null, vendorStrings = { pure: "transform", moz: "-moz-transform", webkit: "-webkit-transform", ...
Get jQuery 1.4 Animation Techniques Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.