jquery single each() function for both radio and checkboxes <p>I'm having requirement that to check each radio button and checkbox of same div that was checked/unchecked. I tried this and found some what uneasy to have too separate loops.</p> <pre><code> { $('#div1 input[type=radio]').each(...); } </code></pre> <p>and </p> <pre><code> { $('#div1 input[type=CHECKBOX]').each(...); } </code></pre> <p>Instead of calling 2 methods, how can I use single each function for both types?</p> <pre><code> { //Like $('#div input[type=radio || CHECKBOX]') } </code></pre>