1 line
1021 B
JSON
1 line
1021 B
JSON
{"name":"innerWidth","type":"method","title":".innerWidth()","deprecated":null,"removed":null,"desc":"Get the current computed width for the first element in the set of matched elements, including padding but not border.","categories":["css","dimensions","manipulation/style-properties","version/1.2.6"],"entries":[{"return":"Number","signatures":{"added":"1.2.6"},"examples":{"desc":"Get the innerWidth of a paragraph.","code":"\nvar p = $( \"p:first\" );\n$( \"p:last\" ).text( \"innerWidth:\" + p.innerWidth() );\n","css":"\n p {\n margin: 10px;\n padding: 5px;\n border: 2px solid #666;\n }\n","html":"\n<p>Hello</p>\n<p></p>\n"},"longdesc":"\n <p>This method returns the width of the element, including left and right padding, in pixels.</p>\n <p>This method is not applicable to <code>window</code> and <code>document</code> objects; for these, use <code><a href=\"/width/\">.width()</a></code> instead.</p>\n <p class=\"image\">\n <img src=\"/resources/0042_04_05.png\"/>\n </p>\n "}]} |