Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
  <meta charset="utf-8">
  <title>jQuery posición y tamaño</title>
</head>
<body>
  <p>jQuery posición y tamaño</p>
    <div id="capa">
    </div>
    <div><span>Height: </span><span id="height"></span></div>
    <div><span>Width: </span><span id="width"></span></div>
    <div><span>innerHeight: </span><span id="innerH"></span></div>
    <div><span>innerWidth: </span><span id="innerW"></span></div>
    <div><span>outerHeight: </span><span id="outerH"></span></div>
    <div><span>outerWidth: </span><span id="outerW"></span></div>
    <div><span>offset: </span><span id="offset"></span></div>
    <div><span>position: </span><span id="position"></span></div>
</body>
</html>
 
$("#height").html($("#capa").height());
$("#width").html($("#capa").width());
$("#innerH").html($("#capa").innerHeight());
$("#innerW").html($("#capa").innerWidth());
$("#outerH").html($("#capa").outerHeight());
$("#outerW").html($("#capa").outerWidth());
$("#offset").html($("#capa").offset().top + " - " + $("#capa").offset().left);
$("#position").html($("#capa").position().top + " - " + $("#capa").position().left);
Output

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

Dismiss x
public
Bin info
aitormedran0pro
0viewers