diff options
author | raylu <raylu@mixpanel.com> | 2011-11-07 22:54:28 -0800 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-11-07 22:54:28 -0800 |
commit | 8fa15a6c08a079b3d170c8f2d5162c786cd76a1d (patch) | |
tree | 1d3b9306b8c665c6425e685215cfec1a26b97263 /js | |
parent | 2d4d1dd5901c97c4f96564093dd239c9624dafc9 (diff) | |
download | pathery-8fa15a6c08a079b3d170c8f2d5162c786cd76a1d.tar.xz |
switch from onload to equivalent of jQuery's ready
Diffstat (limited to 'js')
-rw-r--r-- | js/mapspecs.js | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index e897bbb..21286ee 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -1,16 +1,13 @@ -//
-// 1.0
-//
-//
-//
-
-window.onload = function(){
- //document.getElementById('blocksdisplay').innerHTML = "<b>"+blocks+"</b>";
- //doSend();
+if (document.addEventListener) // Mozilla, Opera, webkit
+ document.addEventListener("DOMContentLoaded", ready, false);
+else if (document.attachEvent) // IE
+ document.attachEvent("onreadystatechange", ready);
+
+var ready = function() {
+ //document.getElementById('blocksdisplay').innerHTML = "<b>"+blocks+"</b>";
loadSol();
- if (isChallenge == true) {
+ if (isChallenge)
challengeLoad();
- }
}
var isChallenge = false;
|