Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  
  <!--script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
  
<!-- script src="http://code.jquery.com/jquery-1.8.0.min.js"></script-->
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <table>
    <colgroup>
      <col style="width: 300px" />
      <col />
    </colgroup>
    <tbody>
      <tr>
        <td>foo</td>
        <td>bar</td>
      </tr>
    </tbody>
  </table>
  
  <div>
  $("col").width() = <span id="width"></span>
  </div>
  <div>
  $("col").outerWidth() = <span id="outerWidth"></span>
  </div>
  <div>
  $("col").css("width") = <span id="css"></span>
  </div>
</body>
</html>
 
table
{
  border: 1px solid black;
  border-collapse: collapse;
}
table td 
{
  border: 1px solid black;
}
 
$("#width").text($("col").width());
$("#outerWidth").text($("col").outerWidth());
$("#css").text($("col").css("width"));
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers