mirror of
https://github.com/imsky/holder.git
synced 2026-04-21 03:01:19 -04:00
Merge branch 'master' of github.com:imsky/holder
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="thumb">
|
||||
<img data-src="holder.js/300x200">
|
||||
<div class="caption">
|
||||
|
||||
Reference in New Issue
Block a user