JSFiddle - React, Tailwind, and code Playground

by Patrick Hund

HTML

<p>
    <input>
    <select></select>
</p>
<p>
    <input>
    <select></select>
</p>

JavaScript

$("p").find("input, select").each(function (index, element) {
    console.log(index);
});