How do I get position left of a hidden element?

How do I get position left of a hidden element?

I know how to get position left -
  1. var posLeft = parseInt($('.class').position().left);

But the class I am using has the style display:none; Is there a way around this?

Why doesn't this work?
  1. var posLeft = parseInt($('.class').css('left').replace("px", ""));