jQuery addClass example

Change class name on click in jQuery

by Dmitri Ganenco

HTML

<input type="text">
<input type="email">

<pre id='pre'></pre>

JavaScript

const $res = $('input').find('[type=text], [type=email]');

$('#pre').text(JSON.stringify($res));