From d30da6a0b29cd1604012f433d5161040c81c7a15 Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 29 Aug 2011 15:28:04 +0100 Subject: [PATCH] < IE9 bug fix for addEventListener --- js/front.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/front.js b/js/front.js index c11e51b..8767689 100644 --- a/js/front.js +++ b/js/front.js @@ -102,7 +102,12 @@ var front = { supportsOrientationChange = (typeof window.onorientationchange !== undefined); orientationEvent = supportsOrientationChange ? "orientationchange" : "resize"; - window.addEventListener(orientationEvent, front.doLayoutSize, false); + if (window.addEventListener) { + window.addEventListener(orientationEvent, front.doLayoutSize, false); + } else { + // < IE9 + window.attachEvent(orientationEvent, front.doLayoutSize, false); + } //$('#kiwi').bind("resize", front.doLayoutSize, false); front.doLayout(); -- 2.25.1