Ernest the JS so none of it evaluates before dom ready.

This commit is contained in:
George Stephanis 2015-08-07 15:36:12 -04:00
parent 846dcb95c6
commit d297a1ac62
1 changed files with 83 additions and 82 deletions

View File

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