====== 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 ==== $(document).ready(function(){ console.log("ready!"); }); //Shorthand for $( document ).ready() $(function(){ console.log("ready!"); }); ==== Avoiding Conflicts with Other Libraries ==== var $j = jQuery.noConflict(); // $j is now an alias to the jQuery function; creating the new alias is optional. jQuery.noConflict(); jQuery( document ).ready(function( $ ) { // You can use the locally-scoped $ in here as an alias to jQuery. $( "div" ).hide(); }); jQuery.noConflict(); (function( $ ) { // Your jQuery code here, using the $ })( jQuery ); ==== DOM Selector ==== // Refining selections. $( "div.foo" ).has( "p" ); // div.foo elements that contain

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){}) ==== Selecting Form Elements ==== * :password * :reset * :radio * :text * :submit * :checkbox * :button * :image * :file $( "form :input" ); $('input[id$="_ym"]').blur(); // id가 '_ym'으로 끝나는 것을 선택 ==== Attributes ==== // 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 ==== Selecting Elements ==== $( "#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 === Pseudo-Selectors === $( "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" ); === Choosing Selectors === // Doesn't work! if ( $( "div.foo" ) ) { ... }