Opened 13 years ago
Closed 13 years ago
#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: | |
Blocked by: | Blocking: |
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 (2)
comment:1 Changed 13 years ago by
Milestone: | 1.4.3 |
---|
comment:2 Changed 13 years ago by
Priority: | → undecided |
---|---|
Resolution: | → invalid |
Status: | new → closed |
var args = { opacity: '1.0' }; args['margin-'+part] = '-100px'; $element.stop().animate(args, 100);
Ask for help on the forum if you need to learn more.
Note: See
TracTickets for help on using
tickets.
Resetting milestone to future.