scrolling fallback mode for IE < 9
authorHakim El Hattab <hakim.elhattab@gmail.com>
Tue, 3 Jan 2012 08:11:05 +0000 (00:11 -0800)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Tue, 3 Jan 2012 08:11:05 +0000 (00:11 -0800)
css/main.css
js/reveal.js

index 2a6b9dbe5db0d5188a1b04851043d22164943479..2a590b73a641e9e494cf0bac13f3e676c4e0752d 100644 (file)
@@ -872,3 +872,27 @@ html {
 }
 
 
+/*********************************************
+ * FALLBACK
+ *********************************************/
+
+.no-transforms {
+       overflow-y: auto;
+}
+
+.no-transforms .slides section {
+       -webkit-transform: none;
+          -moz-transform: none;
+           -ms-transform: none;
+               transform: none;
+       
+       display: block!important;
+       opacity: 1!important;
+       position: relative!important;
+}
+
+
+
+
+
+
index aa5cc7d32e9be37af17710597ac162b1426801e7..767c4b97fba00c91bdb510f25373d14e34ed152e 100644 (file)
@@ -104,13 +104,26 @@ var Reveal = (function(){
                supports3DTransforms =  document.body.style['perspectiveProperty'] !== undefined ||
                                                                document.body.style['WebkitPerspective'] !== undefined || 
                                        document.body.style['MozPerspective'] !== undefined ||
-                                       document.body.style['msTransform'] !== undefined;
+                                       document.body.style['msPerspective'] !== undefined,
+        
+        supports2DTransforms =  document.body.style['transformProperty'] !== undefined ||
+                                                               document.body.style['WebkitTransform'] !== undefined || 
+                                       document.body.style['MozTransform'] !== undefined ||
+                                       document.body.style['msTransform'] !== undefined ||
+                                       document.body.style['OTransform'] !== undefined;
        
        /**
         * Starts up the slideshow by applying configuration
         * options and binding various events.
         */
        function initialize( options ) {
+               
+               if( !supports2DTransforms && !supports3DTransforms ) {
+                       document.body.setAttribute( 'class', 'no-transforms' );
+
+                       return;
+               }
+
                // Cache references to DOM elements
                dom.wrapper = document.querySelector( '#reveal' );
                dom.progress = document.querySelector( '#reveal .progress' );