[컴] without jquery cheat sheet

without jquery / jquery 없이 / html 5 code / plain javascript code



jquery Vanilla
$(document).ready(function(){

});
function ready(fn) {
  if (document.readyState != 'loading'){
    fn();
  } else {
    document.addEventListener('DOMContentLoaded', fn);
  }
}



References

  1. You Might Not Need jQuery

댓글 없음:

댓글 쓰기