Skip to content

Commit

Permalink
Merge pull request #4 from homestar9/patch-1
Browse files Browse the repository at this point in the history
Updated callback to include reference to new container
  • Loading branch information
incraigulous authored Jul 28, 2019
2 parents 323c51c + 5a55c61 commit d014673
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jquery-repeater.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var Repeater = new Class({
removeSelector: '.repeater-remove',
withDataAndEvents: false,
deepWithDataAndEvents: false,
addCallback: function(){},
addCallback: function( newContainer ){},
wrapperHtml: "<div class='repeater-wrap'></div>"
},
i: 0,
Expand Down Expand Up @@ -48,7 +48,7 @@ var Repeater = new Class({
this.incrementContainerAttributes(newContainer);
this.initContainerButtons(newContainer);
$(newContainer).appendTo(this.wrapper);
this.options.addCallback();
this.options.addCallback( newContainer );
this.i++;
},

Expand Down Expand Up @@ -88,4 +88,4 @@ var Repeater = new Class({
}


});
});

0 comments on commit d014673

Please sign in to comment.