So here's my code:
var score1 = $(this).attr('data-score1');
var score2 = $(this).attr('data-score2');
if (score1 < score2) {
// do some
}
if (score2 > score1) {
// do something else
}
Now, this works fine as long as both variables are either both < or both > 100, yet whenever either of those variable is larger than 100 while the other is not the wrong if statement gets triggered. What the hell could be going on here? Thanks for any advice!