If the string is longer than 14 characters change font size

This edits the css if the string is longer than 14 characters

by jelane20

HTML

<div class="CalendarViewAllDayEvent"><a href="http://www.google.com">thisisareallylongword </a></div>

JavaScript

if($('.CalendarViewAllDayEvent a').text().length > 14){
  str = $(".CalendarViewAllDayEvent a").text();
  $('.CalendarViewAllDayEvent a').css('font-size', '20pt');
}