I would like to know how to check if any element has a certain background with pure Javascript (without jQuery).
With jQuery I can use this:
if( $('.icon').css('background-image') === 'url(http://i56.servimg.com/u/f56/12/05/75/97/e410.png)' ){
//do something
}
But I'm having trouble doing pure Javascript. (remembering that there are several .icon
elements on the page, I would like the code to have effect only if it has that specific background ...)