Developer Factory

[jQuery] 호출 순서 본문

Developer/Jquery

[jQuery] 호출 순서

Jeremy.Park 2014. 6. 24. 10:00


<!DOCTYPE html>
<html>
<head>
<meta charset= "UTF-8">
<title> jq001</ title>
<style>
body,h1 {
     border: 1px solid red;
     padding: 20px;
     margin: 5px;
}
</style>
<script src ="http://code.jquery.com/jquery-1.10.2.js" ></script >
<script>
"use strict";

window.onload = function(){
     console.log( 'window.onload = 함수객체...' );
} ;

//  window.jQuery = window.$ = jQuery;
// jQuery(document)

$(document).ready(function(){          //DOM tree 완성 후 선언 순서대로 호출
     console.log( '111 ready(함수객체)...');
});

$(function(){          //DOM tree 완성 후 선언 순서대로 호출
     console.log( '$(함수객체)...');   
});

// jQuery(document).ready(function(){});
$(document).ready(function(){          //DOM tree 완성 후 선언 순서대로 호출
     console.log( '222 ready(함수객체)...');
});

</script>
</head>
<body>
  <h1 >jQuery:  </h1 >
 
  <div id ='content' >
 
  </div >

<script>
console.log('body....End!!!');
</script>
</body>
</html>