<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<table class="shop_table cart" cellspacing="0">
<thead>
<tr>
<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
<th class="product-price"><?php _e( 'Price', 'woocommerce' ); ?></th>
<th class="product-price"></th>
</tr>
</thead>
<tbody>
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
</tbody>
</table>
//изменение заголовка виджета start
function change_widget_title($title, $instance, $wid){
return $title = str_replace('Мета', 'Управление', $title);
}
add_filter('widget_title', 'change_widget_title', 10, 3);
//изменение заголовка виджета end
$('.input_change').change(function() {
let self = $(this);
let id = self.attr('id');
let value = parseInt(self.val());
let inputValue = $('#ar'+ id);
let formula = getFormula(value);
inputValue.val(formula).trigger('change');
});
function getFormula(value) {
return (value * 10);
}
let sum = 0;
$('.input_value').change(function() {
let sum = 0;
$('.input_value').each(function() {
let value = parseFloat($(this).val());
if(value) sum += value;
});
$('.input_sum').val(sum);
});
<select id="cd-dropdown" class="cd-select">
<option value="-1" selected>Choose a weather condition</option>
<option>Sun</option>
<option>Clouds</option>
<option>Snow</option>
<option>Rain</option>
<option>Windy</option>
</select>
jQuery(document).ready(function() {
Price = ["", "100", "200", "300", "400", "500"];
jQuery.each(jQuery("#cd-dropdown option"), function(index, value) {
jQuery(this).val(Price[index]);
});
//do SimpleDropDownEffects plugin here after classes are added.
});
<select id="cd-dropdown" class="cd-select">
<option value="" selected="">Choose a weather condition</option>
<option value="100">Sun</option>
<option value="200">Clouds</option>
<option value="300">Snow</option>
<option value="400">Rain</option>
<option value="500">Windy</option>
</select>