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 7798801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:06:11+00:00 2026-06-02T00:06:11+00:00

I found this question and answer that talks about $.validator.unobtrusive.parse jquery ujs not functioning

  • 0

I found this question and answer that talks about $.validator.unobtrusive.parse

jquery ujs not functioning when I remotely load partials/content with remote calls or jQuery

It looks like this is what I need to do to make jquery work on parts of a page that have been loaded using ajax.

But I would like to know what it’s doing! Is it calling rails ujs, or is it talking to jquery directly? I’ve searched both the rails ujs git hub site and the jquery docs and couldn’t see anything in either of those places. Is there any documentation anywhere?

Thanks for any help.


Perhaps this is clearer:

When I’ve added or changed part of the page using create.js.erb or update.js.erb how do I get jquery to work on these parts of the page. I’m trying to make elements sortable again, this question is about best-in-place editing, there are several other questions out there and the above link seems to be the only answer, and I can’t make that work.

So how do you get jquery to “look at” parts of your page you’ve already changed once using rails ujs.

  • 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-02T00:06:13+00:00Added an answer on June 2, 2026 at 12:06 am

    This is very dependent on the kind of page element you are dealing with that you want to ‘re-work’, and how the original ‘work’ was triggered.

    If the original jquery code get’s trigger simply via:

    $(document).ready(function(){
      $('#mydiv").css('color','red');
    });
    

    And you want to reset the div’s color after update.js.erb changes it’s contents (I know, dumb example), you could create a custom event and bind it to the div:

    $(document).ready(function(){
      $('#mydiv").on('rework', function() {
        $(this).css('color','red');
      });
    });
    

    Then, on the last line of update.js.erb you could do this:

    $('#mydiv').trigger('rework');
    

    If the original work were fired off via an on change event, or a click event, etc. Then you could just trigger that event:

    $('#mydiv').trigger('click');
    

    Triggering events is trick, because a triggered event is NOT exactly the same as the actual event, and events are tricky in general.

    It may be as simple as just slapping duplicate code at the end of your update.js.erb, if it’s a simple one liner or a few lines.

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

Sidebar

Related Questions

While trying to answer this question I found that the code int* p =
I searched and found this question but did not like the answer. Is there
While trying to answer this question I found without () (which invokes C++ most
I know this question has been posted before... but I haven't found any answer
I've been looking for an existing answer to this question, but haven't found one.
I haven't found an answer to this particular question; perhaps there isn't one. But
Found this question that explained a way to communicate between layers. However there is
I found this question which is the same problem that I would like to
I've found this question many times on Google and on StackOverflow, though none answer
I assume that there is probably no satisfactory answer to this question, but I

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.