I have these input boxes where integers are entered. My goal is to display them similar to the images below:
1:
https://i.sstatic.net/3HUbO.png
2:
https://i.sstatic.net/4722H.png
$(document).ready(function() {
$("input").each(function() {
$(this).blur(function() {
var len = $(this).val().length;
});
});
});
.ndInbox {
background-color: white;
width: 390px;
height: 42px;
box-shadow: 0 2px 2px 0 #C2C2C2;
border: none;
outline: none;
font-size: 18px;
margin-bottom: 10px;
font-family: 'PT Sans', sans-serif;
padding-left: 10px;
}
.ndLabel {
color: #999;
font-size: 17px;
font-family: 'PT Sans', sans-serif;
}
<table>
<tr>
<td class="ndLabel" style="position: relative; width: 470px; top:-4px" id="avPurchase03">Average, €:</td>
<td colspan="2">
<input id="lpcfIn02Id" class="ndInbox" type="text" value="" />
</td>
</tr>
<tr>
<td class="ndLabel" style="position: relative; width: 470px; top:-4px" id="avNumber03">Budget, €:</td>
<td colspan="2">
<input id="lpcfIn03Id" class="ndInbox" type="text" value="" />
</td>
</tr>
</table>
An incomplete jQuery
implementation using blur
was attempted but did not achieve the desired functionality. Can my requirements, as depicted in the pictures above, be realized?
Thanks in advance.
UPDATE: By clicking outside the input box, I also mean moving to the next field when tabbing.