I want this function to initiate every 4 seconds. is there a way of putting them in an array and call it every 4 seconds rather than this way. Also, this way has a delay of 16 seconds before it actually begins. Thanks in advance.
setInterval(function() {
setTimeout(function () {
$j('.menu2').trigger('click');
}, 0000);
setTimeout(function () {
$j('.menu3').trigger('click');
}, 4000);
setTimeout(function () {
$j('.menu4').trigger('click');
}, 8000);
setTimeout(function () {
$j('.menu1').trigger('click');
}, 12000);
}, 16000);