I have a problem with some jquery please see below code.
I have 2 events running. What I am trying to achieve is when the first event is completely finishes then I want to run second event.
First event
$("#brand div").each(function(e) {
$(this).delay(600*e).fadeTo('slow',1)
})
Second event
$(".b-circle-image a").each(function(ev) {
$(this).delay(600*ev).fadeTo('slow',1);
})
I even tried like this using status = false; but still doesn’t work.
var checkStatus = true;
$("#brand div").each(function(e) {//Display segments in order
$(this).delay(600*e).fadeTo('slow',1)
checkStatus = false;
})
if(!checkStatus==false){
$(".b-circle-image").show();
$(".b-circle-image a").each(function(ev) {//Display circle image in order
$(this).delay(600*ev).fadeTo('slow',1);
})
}
If any one has any idea about this would be much appreciated.
1 Answer