Modify ↓
Ticket #7274 (closed bug: worksforme)
dashes don't work when used in css() objects
| Reported by: | marc.fuehnen@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.5 |
| Component: | unfiled | Version: | 1.4.3 |
| Keywords: | dashes css | Cc: | |
| Blocking: | Blocked by: |
Description
hi e1,
if you want to change css values using an object as parameter like:
$( "#sample" ).css( {'width': a + 'px'} );
it does not work anymore if you use css properties that start with a dash/hyphen (-), jq ignores the obj key, e.x. transformation
$( "#sample" ).css( {'-moz-transform': 'rotate(' + a + 'deg)'} );
it works if you do it the single-property way:
$( "#sample" ).css( '-moz-transform', 'rotate(' + a + 'deg)' );
tested on windows 7, latest FF, webkit everything was ok in 1.4.2
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.
Note: See
TracTickets for help on using
tickets.

Testing with FireFox latest:
These are all functioning equally as well.
Note that if you're testing - properties across browsers you will obviously have to switch -moz and -webkit, but otherwise these are working perfectly for me.