Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script>
    <style type="text/css">
        #Parent
        {
             width: 300px; 
             background-color: #999; 
             border: 1px solid #aaa;
        }
        #Parent  tr  td 
        {
            width: 60px; 
            height: 60px;
             text-align: center; 
             border: 1px solid #aaa;
        }
        div.positionable
        {
            width: 60px;
            height: 60px;
            position: absolute;
            display: block;
            right: 0;
            bottom: 0;
            background-color: #bcd5e6;
            text-align: center;
        }
    </style>
    <title></title>
</head>
<body>
    <table id="Parent">
        <tr>
            <td id="CellA">A</td>
            <td id="CellB">B</td>
        </tr>
    </table>
    <div id="BoxA" class="positionable">
        <p>A(2)</p>
    </div>
    <div id="BoxB" class="positionable">
        <p>B(2)</p>
    </div>
</body>
</html>
 
function position() {
  $("#BoxA").position({
    of: $("#CellA"),
    my: 'left top',
    at: 'left top',
    offset: '0 0'
  });
}
$(document).ready(function () {
  $(".positionable").css("opacity", 0.5);
  position();
  position();
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers