title: Compare text and string Jquery
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let teste = $('.btn-timer').text().trim();
  
    condition = '15:00'
  
    //let result = teste.localeCompare(condition);
    //console.log(result);
  
    if (teste == condition) {
        $('.btn-timer').removeClass('btn-success');
        $('.btn-timer').addClass('btn-danger');
    }
  
    console.log(teste);
    console.log(condition);</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code> .btn-danger {
          color: #991C32 !important;
          background-color: #FFB2C0 !important;
          border-color: #C82442 !important;
      }
  
      .btn-success {
          color: #234D31 !important;
          background-color: #B2FFCD !important;
          border-color: #449560 !important;
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;button class="btn btn-success shadow btn-timer td-content"&gt;
    &lt;b&gt;15:00&lt;/b&gt;
  &lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I'am trying to implement a code that compare a text() from class with a string:</p>
  <p>I tried a lot of things, but without luck, any help?</p>
  <p>What I am doing wrong? and how to fiz it</p>