jquery-repeaterjQuery 表单
jQuery 重复表单字段。保证表单字段的 name 及 ID 递增。
示例:
//All options are optional. new Repeater($('.repeatable'), { addSelector: '.repeater-add', //The css selector for the add button. removeSelector: '.repeater-remove', //The css selector for the remove button. withDataAndEvents: false, //Should data and events on repeatable sections be cloned? deepWithDataAndEvents: false, //Should data and events of repeatable sections descendants be cloned? addCallback: function(){}, //A callback function that generated repeatable sections will be passed into. wrapperHtml: "<div class='repeater-wrap'></div>" //HTML for an element to wrap all repeatable sections in. });
评论