Dojo : animateProperty for “display”
问题 I'm trying to animate changes of the CSS "display" property with Dojo and dojo/_base/fx. Here's my code : function invert_display(id) { var element = dom.byId(id), currDisplay = style.get(element, 'display'), nextDisplay = currDisplay === 'block' ? 'none' : 'block'; baseFx.animateProperty({ node: id, properties: { display: 'none', backgroundColor: '#f00' } }).play(); } Everything seems to work fine, modules are imported properly (AMD style), variable values are valid and the div background