JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<input> <!-- W3C standards default is text -->
<br>
<input type="text"> <!-- explicit text -->
CSS
.a { border: 3px dashed blue; }
.b { background:yellow; }
JavaScript
console.log($('input[type="text"]').addClass('a').length); // 1 (should be 2)
console.log($(':input[type="text"]').addClass('b').length); // 2 (correct)