Shaking Window Effect

The browser window should shake shortly after this opens. That is, if you're using a supported browser.

Play with it!




The code

/* Usage: shake(n) where n= */
function shake(n) {
	if (parent.moveBy) {
		for (i = 10; i > 0; i--) {
			for (j = n; j > 0; j--) {
				parent.moveBy(0,i);
				parent.moveBy(i,0);
				parent.moveBy(0,-i);
				parent.moveBy(-i,0);
			}
		}
	}
}

Notes

This only works on Firefox, I think. I tried IE7 and Opera 9. .

I can't take credit for this neat effect—it's from Arby's.