Don't constantly rescan the dom for tbody

We have a cached version of $tbody a level up.
This commit is contained in:
George Stephanis 2015-08-07 12:01:40 -04:00
parent 1b035b43a3
commit d3922a96cd
1 changed files with 0 additions and 2 deletions

View File

@ -14,7 +14,6 @@
}); });
$('.wc_tax_rates .remove_tax_rates').click(function() { $('.wc_tax_rates .remove_tax_rates').click(function() {
var $tbody = $('.wc_tax_rates').find('tbody');
if ( $tbody.find('tr.current').size() > 0 ) { if ( $tbody.find('tr.current').size() > 0 ) {
$current = $tbody.find('tr.current'); $current = $tbody.find('tr.current');
$current.find('input').val(''); $current.find('input').val('');
@ -69,7 +68,6 @@
}); });
$('.wc_tax_rates .insert').click(function() { $('.wc_tax_rates .insert').click(function() {
var $tbody = $('.wc_tax_rates').find('tbody');
var size = $tbody.find('tr').size(); var size = $tbody.find('tr').size();
var code = wp.template( 'wc-tax-table-row' )( { var code = wp.template( 'wc-tax-table-row' )( {
tax_rate_id : 'new-' + size, tax_rate_id : 'new-' + size,