嗨我正试图在道场做动画。当按钮悬停在上方时,图像会跳起来,文本会变为黄色。我使用dojo函数,但语法错误
require(["dojo/mouse", "dojo/on", "dojo/dom"], function(mouse, on, dom){
on(dom.byId("button1"), mouse.enter, function(evt){
checkLegendStatus();
require(["dojo/_base/fx"], function(baseFx) {baseFx.animateProperty({node: "b1img", properties: {top: { start: 0, end: -10 }},duration: 200, onEnd: function()
{
dojo.style("caption1", "color", "#ffd152");
}).play();
});
});
非常感谢任何建议。
答案 0 :(得分:0)
刚刚发现我把一个功能打开了,应该是
require(["dojo/mouse", "dojo/on", "dojo/dom"], function(mouse, on, dom){
on(dom.byId("button1"), mouse.enter, function(evt){
checkLegendStatus();
require(["dojo/_base/fx"], function(baseFx) {baseFx.animateProperty({node: "b1img", properties: {top: { start: 0, end: -10 }},duration: 200, onEnd: function()
{
dojo.style("caption1", "color", "#ffd152");
}}).play();
});
});