i have lot of same strings, but values like 1.05 are different
<div >1.05</div>
<div >1.07</div>
Can someone help me to check all values with this div class and if some value less then 1.05 make alert on jQuery like: for each $( ".css-1m1f8hn" ) if value < 1.05 then alert('Less value found');
CodePudding user response:
$(".css-1m1f8hn").each((i,value) => {
if(parseFloat($(value).html()) < 1.05) {
alert('Less value found')
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div >1.05</div>
<div >1.07</div>
<div >1.02</div>