我正在尝试为 a 的属性 ( backgroundColor
)设置动画dijit/form/TextBox
。当这不起作用时,我开始拔头发:
var node = dom.byId("myTextBox");
fx.animateProperty( {
node : node,
duration : 750,
properties : {
backgroundColor : {
start : "yellow"
}
}
}).play();
但是,这有效:
var node = dom.byId("myTextBox");
fx.animateProperty( {
node : node.parentNode.parentNode, // grandparent of "myTextBox"
duration : 750,
properties : {
backgroundColor : {
start : "yellow"
}
}
}).play();
这是它应该如何工作的吗?此页面上的示例不需要,但也没有使用 TextBox。
边问:有没有更直接相当于JQueryUI的highlight
效果?这就是我想要的。