I want to add a sign in an input text field while writing,
if the field extends 20 sign / letters.
How do I accomplish this
So far I tried this:
(function(i){
$('#input-chapter-name' + i).change(function(){
if($(this).val().length() > 20) {
$(this).val($this.val() + '<br>');
}
})
}(i))
Thus I get this error in my console:
Uncaught TypeError: (intermediate value)(...) is not a function(…)