Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <button type="button" id="tfButton">Add text</button>
- <div id="InputsWrapper"></div>
- <div id="OuterWrapper"></div>
- <script>
- $(document).ready(function() {
- var tfCont = 0;
- var InputsWrapper = $("#InputsWrapper");
- var x = InputsWrapper.length;
- var namefield = $("#tfButton");
- $(namefield).click(function() {
- tfCont++;
- $(InputsWrapper).append('<div>' + '<div class="name" id="InputsWrapper_0' + tfCont + '">' + '<input type="textarea" id="field_' + tfCont + '" class="fTypex" placeholder="Thought of the day..."/>' + '<br>' + '</div>' + '</div>');
- $(OuterWrapper).append('<div id="textLayer_' + tfCont + '">' + '<input type="textarea" id="tf_' + tfCont + '">' + '</div>');
- x++;
- return false;
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement