ex :
if ( $div.css('marginLeft') == '-2000px') {
} ..... it is working but i want to check it like
if ( $div.css('marginLeft') > '-2000px') {
} ...... Not working
ex :
if ( $div.css('marginLeft') == '-2000px') {
} ..... it is working but i want to check it like
if ( $div.css('marginLeft') > '-2000px') {
} ...... Not working
Copyright © 2021 Jogjafile Inc.
The problem is that
'-2000px'is a string, and not a number. You cannot use>and<on strings in this way.Try parsing
$div.cssas an integer, and writing the pixels as an integer (without the''):