JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" onclick="one()" value="One">
<input type="button" onclick="two()" value="Two">
<input type="button" onclick="undo()" value="Undo">
<div id="stuff">
<div class="things">
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
<img />
<img />
<img />
<input />
<input />
<input />
<select></select>
<select></select>
<select></select>
...
CSS
.foo { background: red; font-size:8px; }
input { background: pink; }
JavaScript
function one() {
var $colSelect = $('#stuff').find('.things');
$($colSelect).find('img, input, select').addClass("foo");
}
function two() {
var $colSelect = $('#stuff').find('.things');
$($colSelect).find('img').addClass("foo");
$($colSelect).find('input').addClass("foo");
$($colSelect).find('select').addClass("foo");
}
function undo() {
var $colSelect = $('#stuff').find('.things');
$($colSelect).find('img, input, select').removeClass("foo");
}