내용으로 건너뛰기
GaramX
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
현재 위치:
home
»
study
»
jquery
추적:
study:jquery
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== jQuery ====== [[study:jquery:download|Excel Download]] ===== fullCalendar ===== [[https://saintsilver.github.io/FullCalendar-Example|FullCalendar-Example Demo]] [[https://github.com/SaintSilver/FullCalendar-Example.git|FullCalendar-Example]] ===== Tree Structure ===== [[https://github.com/mar10/fancytree/|Fancytree]] - [[study:jquery:fancytree|Fancytree이용하려면]] * [[https://github.com/mar10/dynatree|Dynatree - old version]] ==== DOM ready ==== <code javascript> $(document).ready(function(){ console.log("ready!"); }); //Shorthand for $( document ).ready() $(function(){ console.log("ready!"); }); </code> ==== Avoiding Conflicts with Other Libraries ==== <code javascript> var $j = jQuery.noConflict(); // $j is now an alias to the jQuery function; creating the new alias is optional. </code> <code javascript> jQuery.noConflict(); jQuery( document ).ready(function( $ ) { // You can use the locally-scoped $ in here as an alias to jQuery. $( "div" ).hide(); }); </code> <code javascript> jQuery.noConflict(); (function( $ ) { // Your jQuery code here, using the $ })( jQuery ); </code> ==== DOM Selector ==== <code javascript> // Refining selections. $( "div.foo" ).has( "p" ); // div.foo elements that contain <p> tags $( "h1" ).not( ".bar" ); // h1 elements that don't have a class of bar $( "ul li" ).filter( ".current" ); // unordered list items with class of current $( "ul li" ).first(); // just the first unordered list item $( "ul li" ).eq( 5 ); $("#id1, #id2").text(); $("#select_id option:selected").text(); $("input[id^='boh_ilsu']").each(function(idx,element){}) </code> ==== Selecting Form Elements ==== * :password * :reset * :radio * :text * :submit * :checkbox * :button * :image * :file <code javascript> $( "form :input" ); $('input[id$="_ym"]').blur(); // id가 '_ym'으로 끝나는 것을 선택 </code> ==== Attributes ==== <code javascript> // setter $( "a" ).attr( "href", "allMyHrefsAreTheSameNow.html" ) $( "a" ).attr({ title: "all titles are the same too!", href: "somethingNew.html" }); // getter $( "a" ).attr( "href" ); // Returns the href for the first a element in the document </code> ==== Selecting Elements ==== <code javascript> $( "#myId" ); // Note IDs must be unique per page. $( ".myClass" ); // Selecting Elements by Class Name $( "input[name='first_name']" ); // Selecting Elements by Attribute $( "#contents ul.people li" ); // Selecting Elements by Compound CSS Selector $( "div.myClass, ul.people" ); // Selecting Elements with a Comma-separated List of Selectors </code> === Pseudo-Selectors === <code javascript> $( "a.external:first" ); $( "tr:odd" ); // Select all input-like elements in a form (more on this below). $( "#myForm :input" ); $( "div:visible" ); // All except the first three divs. $( "div:gt(2)" ); // All currently animated divs. $( "div:animated" ); </code> === Choosing Selectors === <code javascript> // Doesn't work! if ( $( "div.foo" ) ) { ... } </code>
study/jquery.txt
· 마지막으로 수정됨: 2025/04/15 10:05 저자
127.0.0.1
문서 도구
문서 보기
이전 판
역링크
맨 위로