문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| study:jquery [2021/11/11 13:15] – [fullCalendar] taekgu | study:jquery [2025/04/15 10:05] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| + | ====== jQuery ====== | ||
| + | [[study: | ||
| + | |||
| + | ===== fullCalendar ===== | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | |||
| + | ===== Tree Structure ===== | ||
| + | [[https:// | ||
| + | * [[https:// | ||
| + | ==== DOM ready ==== | ||
| + | <code javascript> | ||
| + | $(document).ready(function(){ | ||
| + | console.log(" | ||
| + | }); | ||
| + | //Shorthand for $( document ).ready() | ||
| + | $(function(){ | ||
| + | console.log(" | ||
| + | }); | ||
| + | </ | ||
| + | |||
| + | ==== 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 javascript> | ||
| + | jQuery.noConflict(); | ||
| + | |||
| + | jQuery( document ).ready(function( $ ) { | ||
| + | // You can use the locally-scoped $ in here as an alias to jQuery. | ||
| + | $( " | ||
| + | }); | ||
| + | </ | ||
| + | <code javascript> | ||
| + | jQuery.noConflict(); | ||
| + | (function( $ ) { | ||
| + | // Your jQuery code here, using the $ | ||
| + | })( jQuery ); | ||
| + | </ | ||
| + | ==== DOM Selector ==== | ||
| + | <code javascript> | ||
| + | // Refining selections. | ||
| + | $( " | ||
| + | $( " | ||
| + | $( "ul li" ).filter( " | ||
| + | $( "ul li" ).first(); // just the first unordered list item | ||
| + | $( "ul li" ).eq( 5 ); | ||
| + | $("# | ||
| + | $("# | ||
| + | $(" | ||
| + | </ | ||
| + | ==== Selecting Form Elements ==== | ||
| + | * :password | ||
| + | * :reset | ||
| + | * :radio | ||
| + | * :text | ||
| + | * :submit | ||
| + | * :checkbox | ||
| + | * :button | ||
| + | * :image | ||
| + | * :file | ||
| + | <code javascript> | ||
| + | $( "form : | ||
| + | |||
| + | $(' | ||
| + | </ | ||
| + | ==== Attributes ==== | ||
| + | <code javascript> | ||
| + | // setter | ||
| + | $( " | ||
| + | $( " | ||
| + | title: "all titles are the same too!", | ||
| + | href: " | ||
| + | }); | ||
| + | // getter | ||
| + | $( " | ||
| + | </ | ||
| + | ==== Selecting Elements ==== | ||
| + | <code javascript> | ||
| + | $( "# | ||
| + | $( " | ||
| + | $( " | ||
| + | $( "# | ||
| + | $( " | ||
| + | </ | ||
| + | === Pseudo-Selectors === | ||
| + | <code javascript> | ||
| + | $( " | ||
| + | $( " | ||
| + | |||
| + | // Select all input-like elements in a form (more on this below). | ||
| + | $( "# | ||
| + | $( " | ||
| + | |||
| + | // All except the first three divs. | ||
| + | $( " | ||
| + | |||
| + | // All currently animated divs. | ||
| + | $( " | ||
| + | </ | ||
| + | === Choosing Selectors === | ||
| + | <code javascript> | ||
| + | // Doesn' | ||
| + | if ( $( " | ||
| + | ... | ||
| + | } | ||
| + | </ | ||