Skip to content

Instantly share code, notes, and snippets.

@ojimac
Created June 12, 2012 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ojimac/2916672 to your computer and use it in GitHub Desktop.
Save ojimac/2916672 to your computer and use it in GitHub Desktop.
// 1
$(document.ready(function() {
// snip
});
// 2
window.onload = function() {
// snip
};
は、1 → 2の順でイベントが起きる
1. はDOMツリー構築後のイベント
2. はDOMツリー構築 + 画像なども全て読み込んだ後のイベント
@ojimac
Copy link
Author

ojimac commented Jun 12, 2012

camelmasa

あれ、間違ってる?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment