From d3922a96cd6b9cc067c113d1d5db2419a5161063 Mon Sep 17 00:00:00 2001 From: George Stephanis Date: Fri, 7 Aug 2015 12:01:40 -0400 Subject: [PATCH] Don't constantly rescan the dom for tbody We have a cached version of $tbody a level up. --- assets/js/admin/settings-views-html-settings-tax.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/assets/js/admin/settings-views-html-settings-tax.js b/assets/js/admin/settings-views-html-settings-tax.js index 5f04943bf15..e3455f9b80d 100644 --- a/assets/js/admin/settings-views-html-settings-tax.js +++ b/assets/js/admin/settings-views-html-settings-tax.js @@ -14,7 +14,6 @@ }); $('.wc_tax_rates .remove_tax_rates').click(function() { - var $tbody = $('.wc_tax_rates').find('tbody'); if ( $tbody.find('tr.current').size() > 0 ) { $current = $tbody.find('tr.current'); $current.find('input').val(''); @@ -69,7 +68,6 @@ }); $('.wc_tax_rates .insert').click(function() { - var $tbody = $('.wc_tax_rates').find('tbody'); var size = $tbody.find('tr').size(); var code = wp.template( 'wc-tax-table-row' )( { tax_rate_id : 'new-' + size,