Hey guys. I’m trying to rotate a div by 180 degrees on its Y-axis using javascript. It’s triggered by a click event listener and needs to keep rotating the same way, 180 degrees, forever. Any help would be very appreciated. Thanks!
@wbportJul 27.2010 — #Create a series of 12 images each rotated 15 degrees more than the previous image (or choose two other factors of 180), then start a slide show.
@KorJul 28.2010 — #In fact you can do it with a single image, on using HTML5 canvas tag (all new browsers versions, except IE - so far) and some IE only DXImageTransform CSS on-the fly: <i> </i><!doctype html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>rotate()</title>
function rotate(p_deg) { if(document.getElementById('canvas')) { /* Non IE */ var image = document.getElementById('image'); var canvas = document.getElementById('canvas'); var canvasContext = canvas.getContext('2d');