This code doesn't work:
var number = $(this).find('.number').text();
var current = 600;
if (current > number){
// do something
}
HTML:
<div class="number">400</div>
Seems there is some problem with converting text()
from text-like value to number.
What is the solution?