Skip to content

Instantly share code, notes, and snippets.

@yusugomori
Last active December 15, 2015 03:19
Show Gist options
  • Select an option

  • Save yusugomori/5193623 to your computer and use it in GitHub Desktop.

Select an option

Save yusugomori/5193623 to your computer and use it in GitHub Desktop.
var path = '/path/to/img/0.png'; // プリロードさせたい画像のパス
var dfd = preload(path);
dfd.then(function(){
/* 画像読み込み完了後の処理 */
}).fail(function(){
/* 画像読み込み失敗時の処理 */
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment