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() {
|
||||
|
||||
var rowTemplate = wp.template( 'wc-tax-table-row' ),
|
||||
$tbody = $('#rates');
|
||||
|
||||
$(function() {
|
||||
// Blank out the contents.
|
||||
$tbody.innerHTML = '';
|
||||
|
||||
|
@ -27,7 +28,6 @@
|
|||
source: data.states,
|
||||
minLength: 3
|
||||
});
|
||||
});
|
||||
|
||||
$('.wc_tax_rates .remove_tax_rates').click(function() {
|
||||
if ( $tbody.find('tr.current').length > 0 ) {
|
||||
|
@ -123,4 +123,5 @@
|
|||
$(this).attr( 'name', $(this).attr( 'data-name' ) );
|
||||
});
|
||||
|
||||
});
|
||||
})(jQuery, htmlSettingsTaxLocalizeScript, wp);
|
||||
|
|
Loading…
Reference in New Issue