Is it possible to use jQuery to count how many characters are in, for example, an , and if the amount is greater than XX characters, apply a class to
If you want to target a specific li item (instead of all li elements in your page) you can give it an ID :
- ...
Then if you want to execute your code at page load do something like this :
$(document).ready(function() {
var yourElement = $('#myli');
var charLength = yourElement.text().length;
if(charLength > xx){
yourElement.addClass('yourClass');
}
});