0
Я хочу изменить верхнее поле div, когда другой анимированный div достигает 100px
в качестве его левого поля. Я попытался сделать это в анонимной функции, но он не работает.В jquery динамически изменяющиеся свойства css после проверки некоторых свойств css
Ниже приводится код:
(function(){
"use strict";
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
var animatedNumber;
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
animatedNumber = parseInt(Math.random()*10);
document.getElementById("animatedNumber").innerHTML = animatedNumber;
$("#animatedNumber").animate({ marginLeft: '900px' },1000);
if (parseInt($("#animatedNumber").css("marginLeft"))>= 100)
$("#A1").animate({ marginTop: '-=40px' })
} else {
// TODO: This application has been reactivated from suspension.
// Restore application state here.
}
args.setPromise(WinJS.UI.processAll());
}
};
app.oncheckpoint = function (args) {
};
app.start();
})();`