Skip to main content

Bug Tracker

Side navigation

#4864 closed bug (invalid)

Opened July 07, 2009 03:29PM UTC

Closed October 11, 2009 11:42PM UTC

Contradiction in the docs

Reported by: pgacv2 Owned by:
Priority: minor Milestone: 1.4
Component: docs Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

The documentation for css(name) in http://docs.jquery.com/CSS/css states, "Shorthand CSS properties (e.g. margin, background, border) are not supported. For example, if you want to retrieve the rendered margin, use: $(elem).css('marginTop') and $(elem).css('marginRight'), and so on." However, the documentation for jQuery(expression, [context]) at http://docs.jquery.com/Core/jQuery uses the following shorthand as example code:

$("div > p").css("border", "1px solid gray");

Attachments (0)
Change History (2)

Changed July 10, 2009 12:56PM UTC by jakeking comment:1

I think it's only the retrieval that doesn't support shorthand.

Changed October 11, 2009 11:42PM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

Right, retrieval varies across browsers and is not normalized by jQuery. The note you mention is in the

.css("property")
(retrieval) documentation.