Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13468 closed bug (plugin)

.animate() on CSSStyleRule not working in all browser

Reported by: Oscar Jonsson <ogggan@…> Owned by: Oscar Jonsson <ogggan@…>
Priority: undecided Milestone: None
Component: unfiled Version: git
Keywords: Cc:
Blocked by: Blocking:

Description

I've tried doing an .animate() on a CSSStyleRule-object. It works in Chrome and Safari, but in IE9, Firefox and Opera I get: Unhandled Error: WRONG_ARGUMENTS_ERR on line 6926: {{{ return window.getComputedStyle( elem, null ); }}}

Here's the fiddle http://jsfiddle.net/clox/fbhMp/4/

Simply removing that line from the jquery file fixes everthing for me, but I suppose that breaks something else =)

Change History (4)

comment:1 Changed 7 years ago by dmethvin

Owner: set to Oscar Jonsson <ogggan@…>
Status: newpending

Where did you read that you can wrap a CSSStyleRule with a jQuery object?

comment:2 Changed 7 years ago by Oscar Jonsson <ogggan@…>

Status: pendingnew

Well, uh. Nowhere. I just assumed that it would be the same as with a dom-element since they're the same in many ways and I only want to modify their style-property which looks exactly the same as far as I can tell. And it does work crossbrowser. However animating it didn't work when I tried other browsers than Chrome/Safari. Should I have submit this as a feature-request instead perhaps? Sorry, that never hit me.

comment:3 Changed 7 years ago by dmethvin

Resolution: plugin
Status: newclosed

I don't think we want to open a can of worms that big. Because of course once you can wrap a CSSStyleRule you'll want to naturally add new properties with .append() or some such crazy stuff. This is really best done in a plugin.

comment:4 Changed 7 years ago by Oscar Jonsson <ogggan@…>

Alright, my apologies.

Note: See TracTickets for help on using tickets.