mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-09 13:50:17 -04:00
feat(profile): add character count for biography
This commit is contained in:
parent
5d58bb68a0
commit
fcf78a0f9b
|
@ -97,3 +97,8 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
|
|||
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
|
||||
.codehilite .vm { color: #19177C } /* Name.Variable.Magic */
|
||||
.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
|
||||
|
||||
small#count {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
|
|
@ -16,10 +16,14 @@ $(document).ready(function(){
|
|||
}
|
||||
})
|
||||
|
||||
/* Hide "Use nickname" checkbox if person doesn't have a nickname
|
||||
The box won't do anything if they don't have a nickname,
|
||||
but it's nice to just get it out of the way, you know? */
|
||||
if ($("#without-nickname").length) {
|
||||
$("#div_id_use_nickname").hide();
|
||||
}
|
||||
function characterCount() {
|
||||
return $("#id_biography").val().length.toString() + "/1500 characters";
|
||||
}
|
||||
|
||||
$("#div_id_biography").append("<small id=\"count\" class=\"form-text text-muted\"></small>");
|
||||
$("#count").text(characterCount());
|
||||
|
||||
$("#id_biography").keyup(function(){
|
||||
$("#count").text(characterCount());
|
||||
});
|
||||
})
|
Loading…
Reference in New Issue
Block a user