Bug Tracker

Opened 14 years ago

Closed 13 years ago

#4864 closed bug (invalid)

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:


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");

Change History (2)

comment:1 Changed 14 years ago by jakeking

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

comment:2 Changed 13 years ago by dmethvin

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.

Note: See TracTickets for help on using tickets.