CodePen

HTML

            
              <script id="sale-template" type="application/x-json">
  <div class="sale-item">
    <h1>Sale Item</h1>
    <button class="submit-btn">Submit</button>
  </div>
</script>

<button id="add-sale-item">Add Sale Item</button>

<div id="sale-items">
</div>
            
          
!
via HTML Inspector

CSS

            
              
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $("#add-sale-item").click(function() {
  var template = $("#sale-template").text();
  $("#sale-items").append(template);
  
  $(".sale-item .submit-btn").click(function() {
    alert("button clicked!");
  });
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................