1
0
mirror of https://github.com/chyzy/RSystem-MVC synced 2024-12-25 02:15:28 +01:00
RSystem-MVC-Fork/RSystem/Scripts/DedicatedScripts/ChangeFontWeightOnTextChange.js
2018-04-17 11:20:49 +02:00

20 lines
452 B
JavaScript

$('#user-input').keyup(function (e) {
switch (e.keyCode) {
case 8: {
if ($(this).val().length === 0) {
$(this).css("font-weight", "300");
}
break;
}
default:{
$(this).css("font-weight", "400");
}
}
});
$(document).ready(function () {
if ($('#user-input').val().length > 0) {
$('#user-input').css("font-weight", "400");
}
})