Merge branch 'master' of github.com:imsky/holder

This commit is contained in:
Ivan Malopinsky
2014-10-08 20:49:30 -04:00
4 changed files with 21 additions and 21 deletions

View File

@@ -42,7 +42,7 @@ Themes
![](http://imsky.github.io/holder/images/holder_sky.png)![](http://imsky.github.io/holder/images/holder_vine.png)![](http://imsky.github.io/holder/images/holder_lava.png)
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:

View File

@@ -1495,7 +1495,7 @@ Holder.js - client side image placeholders
App.setup.supportsSVG = true;
}
})();
//Exposing to environment and setting up listeners
register(Holder, 'Holder', global);

View File

@@ -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));

View File

@@ -17,7 +17,7 @@
</style>
</head>
<body>
<div class="thumb">
<img data-src="holder.js/300x200">
<div class="caption">