Created
July 5, 2017 14:20
-
-
Save jq-87/d6097bdfac21fc5d05d7c46cca52895a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ready(fn) { | |
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){ | |
fn(); | |
} else { | |
document.addEventListener('DOMContentLoaded', fn); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment