crossline

▼jQuery-セレクタ-

font-size:12px;line-height: 150%;

 

 

 

 

■$( ' セレクタ ' )■

  1. ID セレクタ
  2. タイプセレクタ
  3. CLASSセレクタ
  4. 子孫セレクタ
  5. 全称セレクタ
  6. 子供セレクタ
  7. 隣接兄弟セレクタ
  8. 複数セレクタ
  9. 否定セレクタ
  10. 属性セレクタ
  11. 順番に関するセレクタ
  12. 状態に関するセレクタ
  13. フォームに関するセレクタ

 

 

■$( ' #idValue ' )/$( ' .classValue ' )■

 

f:id:ishuko:20140612022809p:plain

 

ブラウザ上での表示↓

f:id:ishuko:20140612022832p:plain

※ピンポイントでページ内の要素が欲しいときに最適なセレクタ!!

 

■$( ' div ' )■

 

※指定した要素名の要素すべてとってくる

※body要素を取得

 

 

f:id:ishuko:20140612023550p:plain

 

ブラウザ上での表示↓

f:id:ishuko:20140612023611p:plain

 

 

 

□$( ' 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( );