As stated in the title; Is it possible to put a color "on top of" the div's background? What I need to do is change the displayed color of the div without changing 'background-color' value.
The reason for keeping background-color is because I'm using it to compare the clicked divs:
var pick1 = false;
var pick2 = false;
var id1;
var id2;
$('.card').click(function(){
if(pick1) {
pick2 = $(this).css('background-color');
id2 = $(this).attr('id');
if(pick1 == pick2 && id1!=id2) alert('Correct');
else alert('Incorrect');
pick1 = false;
pick2 = false;
} else {
pick1 = $(this).css('background-color');
id1 = $(this).attr('id');
}
});
The goal is to conceal the divs with for example grey color until they are clicked: http://jsfiddle.net/94jerdaw/WJQkA/4/
EDIT:
How do I remove the grey when clicking a div? Check: http://jsfiddle.net/94jerdaw/29TCZ/3/