diff --git a/js/sql.js b/js/sql.js index e61214ef9..43b3af732 100644 --- a/js/sql.js +++ b/js/sql.js @@ -106,15 +106,10 @@ function appendInlineAnchor() { $this_td.after($cloned_anchor); }); - $('#rowsDeleteForm').find('thead').find('th').each(function() { - if($(this).attr('colspan') == 3) { - $(this).attr('colspan', '4') - } - }); - - $('#rowsDeleteForm').find('tbody').find('th').each(function() { - if($(this).attr('colspan') == 3) { - $(this).attr('colspan', '4') + $('#rowsDeleteForm').find('thead, tbody').find('th').each(function() { + var $this_th = $(this); + if ($this_th.attr('colspan') == 3) { + $this_th.attr('colspan', '4') } }); }