Use a multiple selector

Cache jQuery object to avoid unneeded DOM traversal
This commit is contained in:
Marc Delisle
2011-01-12 10:59:16 -05:00
parent 7e79589eba
commit 5d4999c8cc

View File

@@ -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')
}
});
}