Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <button type="button" id="tfButton">Add text</button>
  2. <div id="InputsWrapper"></div>
  3. <div id="OuterWrapper"></div>
  4. <script>
  5. $(document).ready(function() {
  6. var tfCont = 0;
  7. var InputsWrapper = $("#InputsWrapper");
  8. var x = InputsWrapper.length;
  9. var namefield = $("#tfButton");
  10.  
  11. $(namefield).click(function() {
  12. tfCont++;
  13. $(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>');
  14.  
  15. $(OuterWrapper).append('<div id="textLayer_' + tfCont + '">' + '<input type="textarea" id="tf_' + tfCont + '">' + '</div>');
  16. x++;
  17. return false;
  18. });
  19. });
  20. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement