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 6 - rails jquery counts with 2 full-width characters and 1 half-width character
- ruby on rails - uncaught reference error: $is not defined cannot be resolved
- ruby - the last db setting doesn't work when deploying rails app on aws
- ruby on rails - when i run rails s, i get
- ruby on rails - i want to change from the state where only one posted image is displayed to the state where two posted images ar
- ruby on rails uninitialized constant error
- ruby on rails - i want to deploy to aws ec2 server
- ruby on rails - i want to avoid displaying duplicate data for each shop
- ruby - i want to display specific columns in rails in descending order of numbers
- [ruby on rails] how to write when getting a model nested in multiple stages with includes
- ruby on rails 5 - scope by specifying conditions for parent-child relationship
- ruby on rails - i installed ruby with rbenv, but the version does not change
- ruby on rails 5 - the path is changed by redirect_to of rails
- i want to convert wav to mp3 with ruby on rails and pass it to active strage
- ruby on rails 6 - about rails routing error no route matches [get] "/"
- ruby - about implementation of tag function in rails
- ruby on rails - i want to display the posted images in a random order (get information from the record)
- ruby on rails - [rails] i'm implementing a search function using form_with, but i'm having trouble with the search results not b
- ruby on rails - i would like to add an automatic address input function to the new registration screen
- ruby on rails - description of rails packagejson