Void19994,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.button, .test{
border: 1px dashed Gray; padding: 5px; height: 100px; width: 100px; float: left;
}
.button.red{
background-color: #FF0000;
}
.test {
background-color: #FFFF00;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
var btn = $(".button"), len = btn.length;
btn.click(function(){
btn.removeClass("red").stop(true,true);
var indx = (btn.index(this)+1) % len;
$(this).addClass("red").delay(2000).queue(function (){
btn.eq(indx).trigger("click");
});
});
});
</script>
</head>
<body>
<div class="button">1</div>
<div class="test">test</div>
<div class="button">2</div>
<div class="button">3</div>
<div class="test">test</div>
<div class="button">4</div>
<div class="button">5</div>
</body>
</html>