0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

jQueryの勉強メモ

Last updated at Posted at 2023-05-11

jQueryの基本文法

基本文法
$('セレクタ').メソッド(引数)

使ったことのあるイベント

hover : マウスを要素に重ねた時の動き(サイズ変えるとかくらいならcssでも可)

hover
$('セレクタ').hover(

/*マウスを重ねた時の動き*/

    function(){
        $('セレクタ').メソッド(引数);
    },

/*マウスを離した時の動き*/

    function(){
        $('セレクタ').メソッド(引数);
    }
);

click : マウスで要素をクリックした時の動き

click
$('セレクタ').click(
    function(){
        $('セレクタ').メソッド(引数);
    }
);

よく使うメソッド

:point_up:使ってみたらチェックしていこうね私

  • .html()
  • .css()
  • .text()
  • .replaceWith()
  • .replaceAll()
  • .remove()
  • .unwrap()
  • .length()
  • .eq()
  • .find()
  • .addClass()
  • .removeClass()
  • .hasClass()
  • .show()
  • .hide()
  • .fadeIn()
  • .fadeOut()
  • .slideUp()
  • .slideDown()
  • .toggle()
  • .fadeToggle()
  • .slideToggle()
  • .fadeTo()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?