JSFiddle - React, Tailwind, and code Playground

HTML

<p class="link">THE QUICK BROWN FOX IS ABOUT TO JUMP OVER THE FENCE</p>

JavaScript

jQuery.fn.ucwords = function() {
       return this.each(function(){
          var val = $(this).text().toLowerCase(), newVal = '';
          val = val.split(' ');

          for(var c=0; c < val.length; c++) {
             if (c>0 && val[c]=="is" || c>0 && val[c]=="to" || c>0 && val[c]=="the"){
				 newVal+=val[c]+' ';
             } else newVal += val[c].substring(0,1).toUpperCase() + val[c].substring(1,val[c].length) + (c+1==val.length ? '' : ' ');
		
          }
          $(this).text(newVal);
      });
    }
	$(document).ready(function(e) {
		$('p.link').ucwords();
    });