diff --git a/index.html b/index.html index 74fdd7f..30bf229 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ -
+
Aren't you just bored with all those slides-based presentations? @@ -39,7 +39,7 @@ and based on the power of CSS3 transforms and transitions in modern browsers.

-
+
diff --git a/js/impress.js b/js/impress.js index c74df85..5a1b475 100644 --- a/js/impress.js +++ b/js/impress.js @@ -29,6 +29,10 @@ })(); + var arrayify = function ( a ) { + return [].slice.call( a ); + }; + var css = function ( el, props ) { var key, pkey; for ( key in props ) { @@ -49,7 +53,7 @@ var $$ = function ( selector, context ) { context = context || document; - return [].slice.call( context.querySelectorAll(selector) ); + return arrayify( context.querySelectorAll(selector) ); }; var translate = function ( t ) { @@ -71,7 +75,14 @@ // DOM ELEMENTS var impress = document.getElementById("impress"); - var canvas = $(".canvas", impress); + + var canvas = document.createElement("div"); + canvas.className = "canvas"; + + arrayify( impress.childNodes ).forEach(function ( el ) { + canvas.appendChild( el ); + }); + impress.appendChild(canvas); var steps = $$(".step", impress);