Ernest the JS so none of it evaluates before dom ready.
This commit is contained in:
parent
846dcb95c6
commit
d297a1ac62
|
@ -4,10 +4,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function($, data, wp){
|
(function($, data, wp){
|
||||||
|
$(function() {
|
||||||
|
|
||||||
var rowTemplate = wp.template( 'wc-tax-table-row' ),
|
var rowTemplate = wp.template( 'wc-tax-table-row' ),
|
||||||
$tbody = $('#rates');
|
$tbody = $('#rates');
|
||||||
|
|
||||||
$(function() {
|
|
||||||
// Blank out the contents.
|
// Blank out the contents.
|
||||||
$tbody.innerHTML = '';
|
$tbody.innerHTML = '';
|
||||||
|
|
||||||
|
@ -27,7 +28,6 @@
|
||||||
source: data.states,
|
source: data.states,
|
||||||
minLength: 3
|
minLength: 3
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
$('.wc_tax_rates .remove_tax_rates').click(function() {
|
$('.wc_tax_rates .remove_tax_rates').click(function() {
|
||||||
if ( $tbody.find('tr.current').length > 0 ) {
|
if ( $tbody.find('tr.current').length > 0 ) {
|
||||||
|
@ -123,4 +123,5 @@
|
||||||
$(this).attr( 'name', $(this).attr( 'data-name' ) );
|
$(this).attr( 'name', $(this).attr( 'data-name' ) );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
});
|
||||||
})(jQuery, htmlSettingsTaxLocalizeScript, wp);
|
})(jQuery, htmlSettingsTaxLocalizeScript, wp);
|
||||||
|
|
Loading…
Reference in New Issue