title: Apply 'positive' style to a percentage if positive - pulled from Google Sheets
body: <p>I pull data (both numbers and %) in from Google Sheets using ID's. I am trying to applying styling using Javascript that colors the data green if positive and red if it's negative. My Javascript work's perfectly for numbers but not for percentages. </p>
  
  <p>codepen: <a href="https://codepen.io/liamdthompson/pen/YbQRgv" rel="nofollow noreferrer">https://codepen.io/liamdthompson/pen/YbQRgv</a></p>
  
  <pre><code>    divs.forEach(function(div){
          // Convert text to number and test for positive/negative
          if((+div.textContent) &gt;= 0){
          div.classList.add("positive"); // Apply positive style
          } else {
          div.classList.add("negative"); // Apply negative style  
          }
      });  
      });
  </code></pre>
  
  <pre><code>.positive {
    color: green;
  }
  </code></pre>
  
  <pre><code>.negative {
    color: red;
  }
  </code></pre>
  
  <p>This currently results in the number '10.2' being displayed in green, but the percentage '2.00%' displayed in black (where the styling isn't working).</p>