Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jquery-ujs not working for nested elements #478

Open
gokulkrishh opened this issue Sep 19, 2016 · 3 comments
Open

jquery-ujs not working for nested elements #478

gokulkrishh opened this issue Sep 19, 2016 · 3 comments

Comments

@gokulkrishh
Copy link

gokulkrishh commented Sep 19, 2016

I have rails link_to tag nested inside ul, li tags. Like below

<!-- Working -->

<%= link_to(session_path, method: :delete) do %>Sign Out<% end %>

<!-- Not Working -->
<ul>
  <li>something</li>
  <li>something</li>
  <li>something</li>
  <li><%= link_to(session_path, method: :delete) do %>Sign Out<% end %></li>
</ul>

Rails version: 4.2.2
jquery-rails version: 4.0.4

Jquery-ujs is not able to access the nested element.

@rafaelfranca
Copy link
Member

Can you please provide a sample application that reproduces the error?

@gokulkrishh
Copy link
Author

gokulkrishh commented Sep 20, 2016

@rafaelfranca Hey, sorry i cannot share the source code. I have updated the code above which is the sample code.

@rafaelfranca
Copy link
Member

Could you create a new empty application that you can share just to reproduce this issue. Looking the code you shared I don't see anything that is wrong and I could not reproduce this issue either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants