Would like to ask for help regarding this one. I made 4 boxes with 2 background colors (red & green) without using html.
Here's my jsfiddle: https://jsfiddle.net/2bk1Ldg2/3/
How can I make a way to identify the existing background color css to change it alternately within 5sec (red to green & green to red).
Didn't know what's the best query to search regarding this kind of problem. Your awesome answers are a big help to my learning. Appreciate it a lot!
$(document).ready(function() {
function() {
$( ".div1, .div3" ).animate({backgroundColor: 'red'
}, 5000)};
});