My image is embedded in a table cell. I need to know how far it is from edge of window.
offsetLeft does not work for this. Neither does style.left.

Here is a simple example... seems to work. show your relevant code..maybe you have some other issue.

<!DOCTYPE html>
<script src=""></script>
var i = $( "#img1" );
var offset = i.offset();
$("#pos").text( "left: " + offset.left + ", top: " + );

<span id="pos"></span>
<img id="img1" src="" width="250" height="250" style="position:fixed;top:50px;left:50px"/>

Thank you. Your code is very helpful.