Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8934813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:52:01+00:00 2026-06-15T09:52:01+00:00

I been searching around and trying different methods for quite a while and I

  • 0

I been searching around and trying different methods for quite a while and I can’t seem to get the most basic implementation of what I want working.

I simply would like to manipulate a form on the homepage and the first thing I want to do is hide. I don’t understand why my syntax is incorrect.

my form-

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
      <%= devise_error_messages! %>

      <div><%= f.label :first_name %><br />
      <%= f.text_field :first_name %></div>

      <div><%= f.label :last_name %><br />
      <%= f.text_field :last_name %></div>

      <div class="second_step"><%= f.label :profile_name %><br />
      <%= f.text_field :profile_name %></div>

      <div class="second_step"><%= f.label :email %><br />
      <%= f.email_field :email %></div>

      <div><%= f.label :password %><br />
      <%= f.password_field :password %></div>

      <div><%= f.label :password_confirmation %><br />
      <%= f.password_field :password_confirmation %></div>

      <div><%= f.submit "Sign up" %></div>
    <% end %>

    <%= render "devise/shared/links" %>

The simple js in the assets/javascripts/file_name.js

 $('.second_step').hide();

My application.js

//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require jquery.ui.datepicker
//= require justgage
//= require raphael.min
//= require jquery.purr
//= require best_in_place
//= require_tree .

=====

UPDATE

console errors-

Uncaught SyntaxError: Unexpected token ILLEGAL front.js:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/assets/rails.j
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:52:02+00:00Added an answer on June 15, 2026 at 9:52 am

    I found the error.

    I had previously removed the .coffee extension on the file name and the first console error above wasn’t recognizing the # in the default rails notes.

    I got it working by adding back the coffee extension so as properly identify a # as a comment.

    Everything is working below with the filename front.js.coffee
    # Place all the behaviors and hooks related to the matching controller here.
    # All this logic will automatically be available in application.js.
    # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

    jQuery ->
         $('.second_step').hide();
    

    Your answers helped in making sure my syntax was correct and that is was something outside the js. Thanks for your attention.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been searching around now for quite a while and can't get any straight
I've been searching around and trying all sorts of different approaches, but I can't
After searching around for quite a while and trying to come up with a
been searching around for this for a while, and hoping someone here can answer
I have been searching around for answers, but I can't seem to find anything.
I've been searching around trying to work this out for a while now. There's
I've been searching around, trying to find an answer. I know that I can
I've been searching around trying to find an answer to this question, and I
I've been searching around for a while (for the answer) with no success, so
I've been searching around but can't find much about this, but would cross-casting from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.