Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12674 closed bug (notabug)

$.css not working in browsers == !Chrome

Reported by: Ronak Shah Owned by:
Priority: low Milestone: None
Component: css Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

I'm using

$(elem).css('border')

, which is working in Chrome but not in other browsers

Please see this link: http://jsfiddle.net/tXq5c/

This is working in Google Chrome Version 24.0.1284.2 dev-m

But it is not working in:

  • Firefox 15.0.1
  • IE10
  • IE9

Other browser not tested.

Change History (2)

comment:1 Changed 6 years ago by mikesherov

Component: unfiledcss
Priority: undecidedlow
Resolution: notabug
Status: newclosed

Thanks for contributing!

From api.jquery.com/css: "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."

The fact that it works in Chrome is a happy accident, but not something we support or intend to support. Thanks!

comment:2 Changed 6 years ago by dmethvin

It doesn't "work" in Chrome either: http://jsfiddle.net/QAx5P/

Note: See TracTickets for help on using tickets.