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 type="number">  <!-- number input -->

CSS

.a { border: 3px dashed blue; }
.b { background:yellow; }

JavaScript

console.log($('input[type="number"]').addClass('a').length);  // 1
console.log($(':input[type="number"]').addClass('b').length); // 0