Bug Tracker

Ticket #4993: zoom.html

File zoom.html, 732 bytes (added by gkertesz, 10 years ago)
Line 
1<!DOCTYPE html>
2<head>
3<title>Zoom this page!</title>
4
5<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
6<script type="text/javascript">
7
8function update() {
9        $('#js').text(  document.getElementById('x').offsetLeft  );
10        $('#jq-offset').text(  $('#x').offset().left  );
11        $('#jq-pos').text(  $('#x').position().left  );
12}
13
14setInterval(update, 200);
15
16</script>
17</head>
18
19<body>
20<h3>Zoom this page!</h3>
21<p>Where is that red  .........  <span id="x" style="color: red">X</span>?</p>
22<br/>
23<p>javascript .offsetLeft says: <span id="js"></span></p>
24<p>.offset().left says: <span id="jq-offset"></span></p>
25<p>.position().left says: <span id="jq-pos"></span></p>
26</body>
27</html>