質問編集履歴
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -58,45 +58,29 @@
|
|
58
58
|
|
59
59
|
application.js
|
60
60
|
|
61
|
+
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?以降も続きます。
|
62
|
+
|
63
|
+
有名なjqueryを読み込むらしいです。
|
64
|
+
|
65
|
+
その下に動かしたいコードを打ってます。
|
66
|
+
|
67
|
+
railsではなくマークアップのほうで動作確認はしてます。その動いたコードをコピペしているだけですので、タイプミスはありません。
|
68
|
+
|
61
69
|
```ここに言語を入力
|
62
70
|
|
63
|
-
/
|
71
|
+
/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */
|
64
72
|
|
65
|
-
|
73
|
+
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?
|
66
|
-
|
67
|
-
// a relevant structure within app/javascript and only use these pack files to reference
|
68
|
-
|
69
|
-
// that code so it'll be compiled.
|
70
74
|
|
71
75
|
|
72
76
|
|
73
|
-
|
77
|
+
(function($) {
|
74
78
|
|
75
|
-
|
79
|
+
$(function() {
|
76
80
|
|
77
|
-
|
81
|
+
内容
|
78
82
|
|
79
|
-
require("channels")
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
// Uncomment to copy all static images under ../images to the output folder and reference
|
86
|
-
|
87
|
-
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
|
88
|
-
|
89
|
-
// or the `imagePath` JavaScript helper below.
|
90
|
-
|
91
|
-
|
83
|
+
})(jQuery);
|
92
|
-
|
93
|
-
// const images = require.context('../images', true)
|
94
|
-
|
95
|
-
// const imagePath = (name) => images(name, true)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
(function($)を記載してます
|
100
84
|
|
101
85
|
```
|
102
86
|
|