回答編集履歴
2
整理
answer
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
単にボタンの活性、非活性制御したいのであれば下記を使います。
|
|
12
12
|
|
|
13
13
|
- [jQueryのprop()でdisabled属性を切り替える](https://qiita.com/pugiemonn/items/5db6fb8fd8a303406b17)
|
|
14
|
-
[jQuery Document:prop()](http://api.jquery.com/prop/)
|
|
14
|
+
>[jQuery Document:prop()](http://api.jquery.com/prop/)
|
|
15
15
|
|
|
16
|
-
判定には
|
|
16
|
+
判定にはis()を使います。
|
|
17
17
|
- [jQueryで要素がdisabledかどうかを判定する](https://qiita.com/kabane/items/da29a99221b45b4442d3)
|
|
18
|
-
[jQuery Document:is()](http://api.jquery.com/is/)
|
|
18
|
+
>[jQuery Document:is()](http://api.jquery.com/is/)
|
|
19
19
|
|
|
20
20
|
となると、clickイベントでつけた名前がほぼ意味なくなりますね。
|
|
21
21
|
`$('#start').on('click',function start_event(){`
|
1
追記
answer
CHANGED
|
@@ -18,4 +18,10 @@
|
|
|
18
18
|
[jQuery Document:is()](http://api.jquery.com/is/)
|
|
19
19
|
|
|
20
20
|
となると、clickイベントでつけた名前がほぼ意味なくなりますね。
|
|
21
|
-
`$('#start').on('click',function start_event(){`
|
|
21
|
+
`$('#start').on('click',function start_event(){`
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
蛇足。
|
|
26
|
+
ちなみに、有志がこんなものを作ってくれています。
|
|
27
|
+
- [Qiita:jQuery→JavaScript書き換え一覧表](https://qiita.com/okame_qiita/items/d8d85906b88e33ba0eff)
|