Skip to content

Instantly share code, notes, and snippets.

@rizkysyazuli
Created January 14, 2013 16:00
Show Gist options
  • Save rizkysyazuli/4531081 to your computer and use it in GitHub Desktop.
Save rizkysyazuli/4531081 to your computer and use it in GitHub Desktop.
jQuery: SheepIt Config
// jQuery SheepIt Configuration - http://goo.gl/7VrJu
// SheepIt plugin defaults
var defaults = {
separator: '',
// controls
allowRemoveLast: true,
allowRemoveCurrent: true,
allowRemoveAll: false,
allowAdd: true,
allowAddN: false,
// Limits
maxFormsCount: 5,
minFormsCount: 1,
iniFormsCount: 1
};
// forms enhanced with sheepit plugins
var $sheepit = $(".sheepit");
if ($sheepit.length) {
$sheepit.each(function(i) {
$(this).sheepIt(defaults);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment