public/javascripts/nested_fields.js in nested_fields-0.2.2 vs public/javascripts/nested_fields.js in nested_fields-0.3.0

- old
+ new

@@ -5,10 +5,11 @@ }); $('.add_nested_fields').live('click', function() { $.ajax({ context: this, + dataType: 'html', url: this.getAttribute('data-url'), success: function(content) { $(this).after(content); $(this).trigger('nested_fields_ready'); } @@ -33,10 +34,10 @@ $(nested_fieldset).find('> .nested_fields').each(function(i, nested_fields) { $(nested_fields).find('input[id$="' + pos_fld + '"]').val(i); }); } -$('.nested_fieldset').live('nested_fields_ready', function() { +$('fieldset.positioned').live('nested_fields_ready', function() { var pos_fld = this.getAttribute('data-positioned-by'); if (pos_fld) { reposition(this, pos_fld);