jQuery 시작하기

Jmnote (토론 | 기여)님의 2012년 2월 19일 (일) 23:49 판

1 어떤 js를 연결하는 것이 좋을까?

  • 버전별 js파일은 http://code.jquery.com 에 있다.
  • 거기에는 또 같은 버전이라도 비압축 버전(uncompressed)과 압축버전(compressed)이 있다.
  • 안정화 최신 버전은 http://code.jquery.com/jquery.js (일반버전)과 http://code.jquery.com/jquery.min.js (압축버전)이다. 이것으로 연결하면 jquery 측에서 안정화 버전을 올릴 때, 자동으로 업데이트가 되는 효과가 있다. 물론 이로 인해서 예전에 되던 기능이 되지 않을 수도 있을 것이다.

2 example01.php

<source lang=' <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); }); </script> </head>

<body>

클릭하면 사라집니다.

</body>

</html>

3 참고자료

4 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}