Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Just some short examples to get you started (with reservations to not having tested anything, but at least it would get you started)</p> <p>You would of course have to have a way for the customer to know which row, cell and column to pick. I leave that to you, but a <code>$('table').click()</code> might work fine.</p> <p>Copies the last table row and inserts it after the last:</p> <pre><code>$('#main-table-layout tr:last').after($('#main-table-layout tr:last').clone()); </code></pre> <p>Inserts a new column into the table (creates a td in each of the rows) </p> <pre><code>$('#main-table-layout tr).each(function(){ $(this).find('td:last').after($('&lt;td&gt;&lt;/td&gt;')); }); </code></pre> <p>Adjusting the cell-width, you do best with css:</p> <pre><code>$('#the-cell-that-you-want-to-change').css('width','500px'); </code></pre> <p>To adjust the width on all cells:</p> <pre><code>$('td').css('width','500px'); </code></pre> <p>Or to the 3rd column (3rd cell in each row)</p> <pre><code>$('tr').each(function(){$(this).find('td:eq(2)').css('width','500px')}); </code></pre> <p>it might be possible to do the previous one as</p> <pre><code>$('tr').find('td:eq(2)').css('width','500px'); </code></pre> <p>but I am not really sure how jQuery do the selecting there.</p> <p>But, in the end I think you'll better off to let them use an editor like <a href="http://ckeditor.com" rel="nofollow noreferrer">CKEditor</a> or something similiar. Saves you all the trouble of taking care of that yourself.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload