LoginSignup
20
18

More than 5 years have passed since last update.

toggleの表示・非表示の状態判定

Last updated at Posted at 2015-12-01

jqueryにてtoggleの状態判定に悩んだので備忘録です。


    $("#hogehoge").toggle(function () {
        if ($(this).is(':visible')) {
            // 非表示中の処理
            hogehoge;
        } else {
            // 表示中の処理
            hogehoge;
        }
    });

20
18
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
20
18