Answer the question
In order to leave comments, you need to log in
How to display the result of dividing the value of one block by another?
<div class="weight">0.7</div>
<div class="price"><span>1800</span> руб.</div>
<div class="finish">2571.42</div>
Answer the question
In order to leave comments, you need to log in
css
.price::after, .finish::after{
content: " руб."
}
<div class="weight"><span>0.7</span></div>
<div class="price"><span>1800</span></div>
<div class="finish"></div>
var price = $('.price span').text()-0;
var weight = $('.weight span').text()-0;
$('.finish').text(price/weight);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question