Merge pull request #118 from ahmozkya/patch-1
Update app/assets/javascripts/cocoon.js
This commit is contained in:
commit
e4c3fe8023
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
|
||||
|
||||
$('.add_fields').live('click', function(e) {
|
||||
$(document).on('click', '.add_fields', function(e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this),
|
||||
assoc = $this.data('association'),
|
||||
|
@ -55,7 +55,7 @@
|
|||
});
|
||||
|
||||
|
||||
$('.remove_fields.dynamic, .remove_fields.existing').live('click', function(e) {
|
||||
$(document).on('click', '.remove_fields.dynamic, .remove_fields.existing', function(e) {
|
||||
var $this = $(this);
|
||||
var node_to_delete = $this.closest(".nested-fields");
|
||||
var trigger_node = node_to_delete.parent();
|
||||
|
|
Loading…
Reference in New Issue