From 91aca8c186b866d799748ec7a078d3b25d5dfce1 Mon Sep 17 00:00:00 2001 From: Matt Doyle Date: Tue, 27 Nov 2018 10:36:06 +1100 Subject: [PATCH] .width(): Add quotes around .css() width argument Fixes gh-1102 --- entries/width.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/width.xml b/entries/width.xml index f073145a..c197119c 100644 --- a/entries/width.xml +++ b/entries/width.xml @@ -8,7 +8,7 @@ Get the current computed width for the first element in the set of matched elements. -

The difference between .css(width) and .width() is that the latter returns a unit-less pixel value (for example, 400) while the former returns a value with units intact (for example, 400px). The .width() method is recommended when an element's width needs to be used in a mathematical calculation.

+

The difference between .css( "width" ) and .width() is that the latter returns a unit-less pixel value (for example, 400) while the former returns a value with units intact (for example, 400px). The .width() method is recommended when an element's width needs to be used in a mathematical calculation.

Figure 1 - Illustration of the measured width