I am trying this:
if($("#img").css("left")>=100)
but it always returns false because $("#img").css("left") returns "200px" as a string.
parseInt will convert the string into an integer for you:
if(parseInt($("#img").css("left"), 10)>=100)
$("#img").css("left") would ever return prefixed numbers, but better safe than sorry :)