Ticket #5325 (closed bug: invalid)
css property background lets jquery hang in ie&
| Reported by: | twan_van_der_poel | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.3.2 |
| Component: | core | Version: | 1.3.2 |
| Keywords: | css selector | Cc: | twan@…;twan@… |
| Blocking: | Blocked by: |
Description
When a css background property is set with a list like;
$(elem).css({ 'background': 'red' })
and it's a textual value, jQuery hangs if the value isnt a valid background name (on ie7).
I noticed it when debugging to;
$(jquery_prefix+'#'+rowId+' > div:first').css({
'background': 'puprle', 'width': '22px', 'height': '28px', 'margin-top': '-8px', 'background-repeat': 'repeat'
})
Notice the purple isnt spelled correctly, IE7 raises a error message;
Line: 1061, invalid argument.
Which comes down to;
if ( set )
elem[ name ] = value;
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

You've passed in an invalid argument. What should jQuery do? If it masks the error it will be harder to find.