Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
  
<div style="height:200px;background: #cef">spacer</div>
<div id="target">Target</div>
<div style="height:800px;background: #cef" id="log">I expect the following logs to be the same but in older IOS (4.2 or less?) they're not</div>
<script src="http://code.jquery.com/jquery-git.js"></script>
<script>
jQuery(function(){
  var $target = $('#target');
  var $log = $('#log');
  var offset = $target.offset();
  $log.append('<p>'+JSON.stringify(offset)+'</p>');
  window.scrollTo(offset.left,offset.top);
  $log.append('<p>'+JSON.stringify($target.offset())+'</p>');
});
</script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers