Toggle pseudo class :after on specific div

rossm93

New Member
How can I enable or disable (or toggle) the 'after' pseudo class?I'm trying to come up with something along the lines of:\[code\]$('.card').click(function(){ if(pick1) { pick2 = $(this).css('background-color'); id2 = $(this).attr('id'); >>> add display:none to .card:after for the clicked div <<< if(pick1 == pick2 && id1!=id2) alert('Correct'); else { alert('Incorrect'); >>> remove display:none from .card:after on clicked divs <<< } pick1 = false; pick2 = false; } else { pick1 = $(this).css('background-color'); id1 = $(this).attr('id'); >>> add display:none to .card:after for the clicked div <<< }});\[/code\]My project is here: http://jsfiddle.net/94jerdaw/29TCZ/3/
 
Back
Top