DubFriend / jquery.repeater

Create a repeatable group of input elements
MIT License
389 stars 191 forks source link

Improvements for deleting items #126

Open o2sevruk opened 4 years ago

o2sevruk commented 4 years ago

He there!

I have some improvements for the plugin. Change this:

if(fig.initEmpty) { $items().remove(); }

to this:

if(fig.initEmpty) { $items().first().remove(); }

If you do this, it will be useful in cases where some elements are predefined. Otherwise, deletion does not work for predefined items.