Skip to main content

Bug Tracker

Side navigation

#3093 closed bug (duplicate)

Opened June 26, 2008 09:37PM UTC

Closed March 02, 2009 12:43AM UTC

Attribute selector doesn't work right with style

Reported by: ajpiano Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: attribute selector style Cc:
Blocked by: Blocking:
Description

One might assume that one would use $("[style]") to find all elements with an inline style attribute, which isn't exactly how it works.

[$("div").length,$("div[style]").length,$("div[class]").length,$("[style]").length];

// returned [48,48,32,959] in a random sample document.

Seems confusing.

Attachments (0)
Change History (2)

Changed June 30, 2008 03:19PM UTC by flesler comment:1

need: ReviewTest Case

Can you please provide a test case ? that is, a small html file with the minimum html/css/js necessary to reproduce the problem.

Also, please specify what browsers are you trying this on.

Thanks

Changed March 02, 2009 12:43AM UTC by dmethvin comment:2

resolution: → duplicate
status: newclosed

This is a duplicate of #3399; the problem is that

.attr("style")
returns the style property/expando and not the style attribute.