回答編集履歴

1

情報の追加。

2018/10/08 07:43

投稿

kei344
kei344

スコア69400

test CHANGED
@@ -19,3 +19,45 @@
19
19
  【ChromeのデベロッパーツールでJSをデバッグする方法(2018年版) - ICS MEDIA】
20
20
 
21
21
  [https://ics.media/entry/11735](https://ics.media/entry/11735)
22
+
23
+
24
+
25
+
26
+
27
+ ---
28
+
29
+
30
+
31
+ **追記:**
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ ```js
40
+
41
+ jQuery(function(){
42
+
43
+ //appends an "active" class to .popup and .popup-content when the "Open" button is clicked
44
+
45
+ jQuery(".open").on("click", function(){
46
+
47
+ jQuery(".popup-overlay, .popup-content").addClass("active");
48
+
49
+ });
50
+
51
+
52
+
53
+ //removes the "active" class to .popup and .popup-content when the "Close" button is clicked
54
+
55
+ jQuery(".close, .popup-overlay").on("click", function(){
56
+
57
+ jQuery(".popup-overlay, .popup-content").removeClass("active");
58
+
59
+ });
60
+
61
+ });
62
+
63
+ ```