JSFiddle - React, Tailwind, and code Playground

by Sahin Deniz

HTML

<div id="Div_1">
    <input name="Not_1" type="text" class="w50 textalignCenter" id="Not_1" value="100">
</div>

JavaScript

$("#Div_1").hover(
  function () {
        This=$("#Div_1").children(":first")
	    This.on("mouseover change keydown keyup blur", function(){
		if (/[^\d]/g.test(This.val()))
		{
			This.val(This.val().replace(/[^\d]/g, ""));
		}
		if (This.val()<60){Renk="#f00";if (This.val()<0){This.val('0')}}
		else if (This.val()>=60){Renk="#0f0";if (This.val()>100){This.val('100')}}
		This.css({"border": 'solid 1px '+Renk});
	});
  }
);