▼jQuery-セレクタ-
font-size:12px;line-height: 150%;
■$( ' セレクタ ' )■
- ID セレクタ
- タイプセレクタ
- CLASSセレクタ
- 子孫セレクタ
- 全称セレクタ
- 子供セレクタ
- 隣接兄弟セレクタ
- 複数セレクタ
- 否定セレクタ
- 属性セレクタ
- 順番に関するセレクタ
- 状態に関するセレクタ
- フォームに関するセレクタ
■$( ' #idValue ' )/$( ' .classValue ' )■
ブラウザ上での表示↓
※ピンポイントでページ内の要素が欲しいときに最適なセレクタ!!
■$( ' div ' )■
※指定した要素名の要素すべてとってくる
※body要素を取得
ブラウザ上での表示↓
□$( ' p strong ' ) 子孫セレクタ
□$( ' #div > p: not ( .box ) ' ) 高度なセレクタ;idがdivの要素にあるp要素のうち、クラ $( ' list:first-child ' ) スboxに属さない要素を取得する。
■show/hide■
jQueryObject.css( );
jQueryObject.show( ); =ほぼ同じ= jQueryObject.css('display','block' );
jQueryObject.hide( ); =ほぼ同じ= jQueryObject.show( 'display','none');
jQueryObject.weight( );
jQueryObject.height( );
jQueryObject.removeClass( );
jQueryObject.text( );
jQueryObject.html( );
jQueryObject.empty( );