title: Change color of collapsible on click materialize
body: <p>I would like to change the color of the collapsible header only when I click on it. </p>
  
  <pre><code>&lt;div class="collapsible-header" onclick="connect()"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I have to add the color inside the class element, and I do not really know how to add something to it when I call the "connect" funtion. Is this possible ? </p>
  
  <p>Thank you !</p>
  
  <p>Tried with the following but is not working </p>
  
  <p>HTML </p>
  
  <pre><code>&lt;div class="collapsible-header" onclick="connect(this)"&gt;Robot&lt;/div&gt; 
  </code></pre>
  
  <p>And in JS </p>
  
  <pre><code>function connect(element) 
  { 
      element.style.color = 'red';
      if (connection_status == 0)
      { 
          client.connect(options);
      };
  }
  </code></pre>