You can use parseInt():
var leftValue = parseInt($('#block').css("left"));
It automatically removes “px” and extracts the number.
You can use parseInt():
var leftValue = parseInt($('#block').css("left"));
It automatically removes “px” and extracts the number.