JSFiddle - React, Tailwind, and code Playground

by Terry Mun

HTML

<button type="button">Hide if CSS background matches regex <code>/1600x50/g</code></button>
<div class="bg"></div>
<div class="bg"></div>
<div class="bg"></div>
<div class="no-bg" style="background-image: url('http://placehold.it/1600x50')"></div>
<div class="no-bg"></div>
<div class="bg"></div>
<div class="bg"></div>
<div class="no-bg"></div>

CSS

div {
    background-color: #333;
    width: 100%;
    height: 40px;
    margin-bottom: 20px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}
.bg {
    background-image: url('http://placehold.it/1600x50');
}

JavaScript

$('button').click(function() {
    $('div').filter(function() {
        return $(this).css('background-image').match(/http:\/\/placehold\.it/gi);
    }).slideUp(500);
});