For example, I have this jQuery function:
function example(){
var trigger = $('.image');
trigger.each(function(e){
// here I want to change the background color of the :after pseudo-element
$(this:after).css('background-color', 'red');
// ^ the above obviously doesn't work
});
}
How can I add, change or remove CSS attributes to a pseudo-element of $(this)
?