I'm making a blog like this, and I'm trying to implement a function that opens a folder when I touch the gray camera part.
However, an error Uncaught ReferenceError: jQuery is not defined at can be found by examining the Chrome console. This proved that JQuery was not loaded or defined by searching.
<% = form_for article do | f |%>
<% = image_tag 'grey-bg.jpg', class: 'article-image'%>
<% = f.attachment_field: image%>
<% = f.label: title, 'title'%>
<% = f.text_field: title, class: 'form-control'%>
<% = f.label: body, 'Body'%>
<% = f.text_area: body, rows: 10, class: 'form-control'%>
<% = f.submit class: 'btn btn-success'%>
---------------------ー ー ー ー ー ー
$('# cover-image'). click->
$('# article_image'). click ()
Here is the code.
It has been about an hour and a half after searching for typographical errors or description errors.
Please give me a professor.
Answer # 1
js looks something like this, but I don't know why I get an error ...
Probably because jQuery body is not loaded.
- ruby on rails - uncaught reference error: $is not defined cannot be resolved
- ruby on rails 6 - rails tutorial chapter 14 about follow, unfollow, following? methods
- ruby - [rails] follow function cannot be implemented
- i want to get the value of the ruby embed code of the erb file with jquery
- ruby on rails - i want to be able to search the data from the controller on the view side
- ruby on rails implementation of purchase history page when two are purchased at the same time
- ruby - [rails] i want to know the role of the aws access key in credentialsymlenc
- i want to fix a syntax error in ruby on rails
- ruby on rails - i get an error saying "activerecord :: recordnotfound in messagescontroller # index" "couldn't fi
- ruby on rails 5 - i want to introduce micropost search, but i get nomethoderror: undefined method `activated?'for nil: nilclass
- ruby - [rails] i can't bundle install on my macbook
- i want to output all ruby on rails flash messages
- ruby on rails - helper cannot be read by controller
- ruby on rails 6 - rails public specifying the absolute path of the image below
- ruby on rails 6 - please tell me how to read a constant file with helper in rails
- ruby on rails - get data for rails intermediate table
- ruby - how to use rails link_to
- ruby on rails - multi-level category children method
- ruby on rails - i want to save text information in rails
- ruby on rails - i get an error when i log in
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- python 3x - typeerror: 'method' object is not subscriptable
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - unresolved reference comes out in kotlin