Sha256: 1d28e9726ed3df69c8f2770ef6ece53e47e2a90baca3d057d355b7a0e2d1dbc5
Contents?: true
Size: 988 Bytes
Versions: 4
Compression:
Stored size: 988 Bytes
Contents
<table class="uikit-table"> <thead> <tr> <th>Item number</th> <th>Amount</th> </tr> </thead> <tbody> <tr class="item-row"> <td data-label="Item number"> {% include forms/text-field.html pattern="[0-9]*" %} </td> <td data-label="Amount"> {% include forms/text-field.html placeholder="$" pattern="[0-9]*" type="number" step="0.01" %} </td> </tr> </tbody> </table> {% include buttons/link-button.html text="Add another item" className="uikit-btn--tertiary uikit-btn--block" onclick="addRow()"%} <script type="text/javascript"> var addRow = function() { var xhr = new XMLHttpRequest(); xhr.responseType = 'document'; xhr.open('GET', window.location.href); xhr.onload = function() { var tableRow = this.response.querySelector('.item-row'); var tableBody = document.querySelector('.uikit-table tbody'); tableBody.appendChild(tableRow); }; xhr.send(); } </script>
Version data entries
4 entries across 4 versions & 1 rubygems