상세 컨텐츠

본문 제목

j-query 시작

노드js·자바스크립트

by 김일국 2012. 5. 14. 00:07

본문

 jQuery를 사용할때 기본적인 셋팅 방법
 
1.jQuery.js (  http://jquery.com/ 에 접속하여 우측의 Download 클릭 )
2.사용하고싶은 plug-in (상단의 plugins 탭을 통해 쓰고싶은걸 선택해서 받을 수 있다. )

이후 <head> </head> 사이에 jQuery.js 를 넣어준다.

<SCRIPT type="text/javascript" src="jquery.js"></script>

그 이후 사용하고싶은 plug-in 들을 그 밑에 삽입해주면 된다.

<script type="text/javascript" src="jquery.blockUI.js"></script>
<script type="text/javascript" src="jquery.validate.js"></script>

결과 테스트
<script language="javascript">
$(function(){
alert ('Hello, jQuery!');
});
</script>

 

파일을 받아서 자신이 사용하고자 하는 서버에 올려 사용할 수도 있지만. jQuery CDN(Contents Delivery)을 이용해서 가장 최신 버전을 수정없이 사용할 수 있다.

1. jQuery CDN 찾기

http://docs.jquery.com/Downloading_jQuery ( CDN Hosted jQuery 클릭 )

http://docs.jquery.com/Plugins/Validation

적용 예)
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script>
<SCRIPT type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.js"></script>

 

2. jQuery 각종효과모음

※ 배너 모음 ☞ jQuery Banners

※ 슬라이드 모음 ☞ jQuery Sliders

※ 탭 모음 ☞ jQuery Tabs

 

※ 주기 모음 ☞ Cycle

※ 각종 모음 ☞ codrops

※ 각종 모음 ☞ http://www.webmini.net

관련글 더보기

댓글 영역