I'm trying to adjust title sizes depending on character length. (wordpress)
This is what I have so far. It doesn't return any error but it doesn't work.
jQuery(function ($) {
$(window).load(function () {
var textLength = $('.autotitle').val().length;
if (textLength < 20) {
// Do noting
} else if (textLength > 20) {
$('.autotitle').css('font-size', '16px');
}
});
});