Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function buildId(id) {
- return 'data[Experience][' + id + '][experience_content]';
- }
- jQuery('#foo').click((function () {
- var i = 0;
- return function () {
- var $target = jQuery(buildId(i));
- $target
- .clone()
- .attr('id', buildId(i + 1))
- .insertAfter($target);
- i = i + 1;
- };
- })());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement