Modify ↓
Ticket #6191 (closed bug: invalid)
Assigining CSS property in animate() via external variable fails
| Reported by: | riddle | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | |
| Component: | effects | Version: | 1.4.2 |
| Keywords: | animate property | Cc: | |
| Blocking: | Blocked by: |
Description
var part = 'left'; for testing purposes only var margin_variable = 'margin-' + part;
this works: $element.stop().animate({
'margin-left': '-100px', 'opacity': '1.0'
}, 100);
this won't work: $element.stop().animate({
margin_variable: '-100px', 'opacity': '1.0'
}, 100);
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.

Resetting milestone to future.