We have

<div class="price-round">111.26</div> <div class="price-round">222.49</div> <div class="price-round">333.56</div> <div class="price-round">444.96</div> 

It is necessary to round up the values ​​in a big way and insert them into their places, the number of prices on the page may vary.

As a result, you need to get:

 <div class="price-round">112</div> <div class="price-round">223</div> <div class="price-round">334</div> <div class="price-round">445</div> 

    2 answers 2

     $('.price-round').each(function(){ $(this).text(Math.ceil($(this).text())); }); 
    • Rounding up - Math.ceil() - check1st
    • I did not pay attention to what is of great interest. thanks - Andy
     $(".price-round").each(function(){ $(this).text(Math.ceil(parseFloat($(this).text()))); });