Answer the question
In order to leave comments, you need to log in
How to execute js functions one by one for all browsers?
There is a set of simple functions that are executed after a certain period of time (each through its own). The essence of these functions is to create a simple animation of two objects, movement, adding a css animation class, and so on. All functions are in the html document itself, without connection through files. I noticed one feature that is not clear to me: in Chrome, IE, Firefox, the functions are executed in a different order.
Some of the functions are written using the Move.js library
$(document).ready(function() {
move('.home-img-animate-1').ease('in').x(1150).duration('2s').end();
move('.home-img-animate-1').set('opacity', .0).then().set('opacity', 1).duration('2s').pop().end();
move('.home-img-animate-steak').ease('in').y(-300).duration('1.5s').end();
move('.home-img-animate-steak').set('opacity', .0).then().set('opacity', 1).duration('2s').pop().end();
move('.home-img-animate-knife').ease('in').x(-300).duration('1.5s').end();
move('.home-img-animate-knife').set('opacity', .0).then().set('opacity', 1).duration('2s').pop().end();
move('.home-img-animate-2').ease('in').x(-1050).duration('2s').end();
move('.home-img-animate-2').set('opacity', .0).then().set('opacity', 1).duration('2s').pop().end();
move('.home-img-animate-3').set('opacity', .0).then().set('opacity', 1).duration('6s').pop().end();
});
function func_remove_2() {
$( ".home-img-animate-1, .home-img-animate-2" ).removeClass( "alarm" );
}
setTimeout(func_remove_2, 4500);
function func_2() {
$( ".pechat" ).addClass( "expandOpen full-opacity" );
}
setTimeout(func_2, 4000);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question