I found an error in the script that was written, and I am having trouble figuring out what causes the problems. In particular:
"49px" < 50 === false
There can be two different conversions:
49 < 50 === true "49px" < "50" === true "49" < 50 === true
I fixed it with
parseInt("49px") < 50 === true
So why is this evaluating to false? What exactly is going on here?
Matthew scharley
source share