JSFiddle - React, Tailwind, and code Playground
by alok Sharma
HTML
<form>
<input type="text" id="text1" >
<br>
<input type="text" id="text2" >
<br>
<input type="text" id="text3" >
<br>
<input type="text" id="text4" >
<br>
<br>
<input type="text" id="text5" >
<input type="text" id="text6" >
<input type="text" id="text7" >
</form>
CSS
.el {
width: 50px;
height: 50px;
background: red;
}
JavaScript
var _mouseDown = false;
$( "input[id^='text']" ).mousedown(function() {
_mouseDown = true;
});
$( "input[id^='text']" ).mousemove(function() {
if ( _mouseDown ) {
$(this).css("border-color","black")
}
});
$( "input[id^='text']" ).mouseup(function() {
_mouseDown = false;
});