ドキュメント

Utilities/jQuery.boxModel

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Utilities

jQuery.boxModel

Deprecated in jQuery 1.3 (see jQuery.support) States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model.
Examples:

Returns the box model for the iframe.

    $("p").html("The box model for this iframe is: <span>" +
                jQuery.boxModel + "</span>");

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script>
  $(document).ready(function(){
    
    $("p").html("The box model for this iframe is: <span>" +
                jQuery.boxModel + "</span>");

  });
  </script>
  <style>
  p { color:blue; margin:20px; }
  span { color:red; }
  </style>
</head>
<body>
  <p>
  </p>
</body>
</html>

Returns false if the page is in QuirksMode in Internet Explorer

$.boxModel

false

NameType