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

Need to start an event/function after fields_added.nested_form_fields #96

Open
bassman88 opened this issue Nov 13, 2017 · 3 comments
Open

Comments

@bassman88
Copy link

Is there an event/function I can call to run AFTER fields_added?

@ncri
Copy link
Owner

ncri commented Nov 13, 2017

It's in the readme: fields_added

@bassman88
Copy link
Author

@ncri I need to be able to call an event after the one below:
$(document).on("fields_added.nested_form_fields", function(){ $('.increment').last().text('<%= @less_per_unit %>'); calc_total(); });

@ncri
Copy link
Owner

ncri commented Nov 13, 2017

Oh, i was reading "after fields added". ;-) Well, the fields_added event is the last thing happening when adding nested fields, so you can simply put the code behind the other code you have in the on callback? Why would it need to be later?

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