2
Contributors
2
Replies
14
Views
3 Years
Discussion Span
Last Post by hilRunr
0

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

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
var i = $( "#img1" );
var offset = i.offset();
$("#pos").text( "left: " + offset.left + ", top: " + offset.top );

});
</script>
</head>
<body>     
<span id="pos"></span>
<img id="img1" src="" width="250" height="250" style="position:fixed;top:50px;left:50px"/>
</body>
</html>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.