diff --git a/README.md b/README.md index 946f572..efcbd83 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Themes  -Holder includes support for themes, to help placeholders blend in with your layout. +Holder includes support for themes, to help placeholders blend in with your layout. There are 6 default themes: ``sky``, ``vine``, ``lava``, ``gray``, ``industrial``, and ``social``. Use them like so: diff --git a/src/holder.js b/src/holder.js index 1314c9d..c9f6af8 100644 --- a/src/holder.js +++ b/src/holder.js @@ -1496,7 +1496,7 @@ Holder.js - client side image placeholders App.setup.supportsSVG = true; } })(); - + //Exposing to environment and setting up listeners register(Holder, 'Holder', global); diff --git a/src/ondomready.js b/src/ondomready.js index d2ea609..c177b0d 100644 --- a/src/ondomready.js +++ b/src/ondomready.js @@ -1,15 +1,15 @@ -/*! +/*! * onDomReady.js 1.4.0 (c) 2013 Tubal Martin - MIT license - * + * * Specially modified to work with Holder.js */ ;(function(name, global, callback){ global[name] = callback; -})("onDomReady", this, +})("onDomReady", this, (function(win) { - + 'use strict'; //Lazy loading fix for Firefox < 3.6 @@ -46,16 +46,16 @@ // Callbacks pending execution until DOM is ready callbacks = []; - + // Handle when the DOM is ready function ready( fn ) { if ( !isReady ) { - + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !doc.body ) { return defer( ready ); } - + // Remember that the DOM is ready isReady = true; @@ -63,7 +63,7 @@ while ( fn = callbacks.shift() ) { defer( fn ); } - } + } } // The ready event handler @@ -85,13 +85,13 @@ win[DETACHEVENT]( ONLOAD, completed ); } } - + // Defers a function, scheduling it to run after the current call stack has cleared. function defer( fn, wait ) { // Allow 0 to be passed setTimeout( fn, +wait >= 0 ? wait : 1 ); } - + // Attach the listeners: // Catch cases where onDomReady is called after the browser event has already occurred. @@ -101,7 +101,7 @@ // Handle it asynchronously to allow scripts the opportunity to delay ready defer( ready ); - // Standards-based browsers support DOMContentLoaded + // Standards-based browsers support DOMContentLoaded } else if ( w3c ) { // Use the handy event callback doc[ADDEVENTLISTENER]( DOMCONTENTLOADED, completed, FALSE ); @@ -110,7 +110,7 @@ win[ADDEVENTLISTENER]( LOAD, completed, FALSE ); // If IE event model is used - } else { + } else { // Ensure firing before onload, maybe late but safe also for iframes doc[ATTACHEVENT]( ONREADYSTATECHANGE, completed ); @@ -141,20 +141,20 @@ ready(); } })(); - } - } - - function onDomReady( fn ) { + } + } + + function onDomReady( fn ) { // If DOM is ready, execute the function (async), otherwise wait isReady ? defer( fn ) : callbacks.push( fn ); } - + // Add version onDomReady.version = "1.4.0"; // Add method to check if DOM is ready onDomReady.isReady = function(){ return isReady; }; - + return onDomReady; })(this)); diff --git a/test/index.html b/test/index.html index 67528a4..ea8f599 100644 --- a/test/index.html +++ b/test/index.html @@ -17,7 +17,7 @@
- +