Skip to content

Instantly share code, notes, and snippets.

@jamesflorentino
Created October 12, 2011 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesflorentino/1280739 to your computer and use it in GitHub Desktop.
Save jamesflorentino/1280739 to your computer and use it in GitHub Desktop.
/** assuming you have these in your <body>
<input id="textfield"></input>
<div id="container"></div>
**/
var container = $('#container');
var template = '<div><input></input></div>';
var i = $('input#textfield').attr('id');
i = parseInt(i);
while(i-- > 0){
container.append(template);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment