1
0
mirror of https://github.com/chyzy/RSystem-MVC synced 2024-12-25 10:20:29 +01:00
RSystem-MVC-Fork/RSystem/Scripts/DedicatedScripts/ChangeFontWeightOnTextChange.js

20 lines
452 B
JavaScript
Raw Normal View History

2018-04-17 11:20:49 +02:00
$('#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");
}
})