JSFiddle - React, Tailwind, and code Playground

by kplatova

HTML

<table class="table">
			<colgroup>
				<col style="">
				<col style="width: 100px;">
				<col style="width: 110px;">
				<col style="width: 140px;">
			</colgroup>
			<thead>
				<tr>
					<th>Название
					</th>
					<th>Цена
					</th>
					<th>Количество
					</th>
					<th>&nbsp;
					</th>
				</tr>
			</thead>
			<tbody>
	
		<tr id="body_contentOfscpShoppingCart_repeaterItems_trItemInfo_0">
	<td>
				<a href="product/32.aspx" target="_blank">Светодиодный RGB контроллер Noolite SD111-180</a>
			</td>
	<td>
				<span>2&nbsp;574 р.</span>
			</td>
	<td>
				<input type="hidden" name="ctl00$body$contentOfscpShoppingCart$repeaterItems$ctl01$hfItemId" id="body_contentOfscpShoppingCart_repeaterItems_hfItemId_0" value="32">
				<input name="ctl00$body$contentOfscpShoppingCart$repeaterItems$ctl01$tbItemsCount" type="text" value="1" maxlength="7" id="body_contentOfscpShoppingCart_repeaterItems_tbItemsCount_0" class="item-count" style="width:40px;">
			</td>
	<td>
				<a onclick="javascript:return confirm('Вы действительно хотите удалить [Светодиодный RGB контроллер Noolite SD111-180] из корзины?');" href="javascript:__doPostBack('ctl00$body$contentOfscpShoppingCart$repeaterItems$ctl01$ctl06','')">Удалить</a>
			</td>
</tr>

	
		</tbody>
</table>
                <div class="clearfix">

	<p class="pull-right">
		Общая стоимость заказа: 
			<strong>
				<span id="body_contentOfscpShoppingCart_lblTotalSum">2&nbsp;574 р.</span></strong>
	</p>
	<p>
		<a class="btn" href="javascript:__doPostBack('ctl00$body$contentOfscpShoppingCart$ctl00','')">Пересчитать сумму заказа</a>
		<a class="btn" href="javascript:__doPostBack('ctl00$body$contentOfscpShoppingCart$ctl01','')">Очистить корзину</a>
	</p>
</div>
                <div id="body_contentOfscpShoppingCart_panelDeliverySwitcher">
			<label class="checkbox">
				<input name="ctl00$body$contentOfscpShoppingCart$cbSelfDelivery" type="checkbox" id="body_contentOfscpShoppingCart_cbSelfDelivery">
				Самовывоз
			</label>
		</div>

JavaScript

$( document ).ready(function() {
    var totalSum = $('#body_contentOfscpShoppingCart_lblTotalSum').text().replace(/[^0-9]/gi, '');
    
    if (
        $('#body_contentOfscpShoppingCart_cbSelfDelivery').prop('checked', true)
      )
    {
        totalSumPickup = Math.floor(totalSum*0.97);
        
        if ()
        
        //alert('Самовывоз и сумма заказа '+ totalSumPickup );
    }
});