jQuery - Compare value and color text
<p>I have made two dropdown lists. When a value is selected in the first, sub-values can be selected in the second. Then it display a table with parameters and specific values.</p>

<p>I want to change a text color when parameter's value is greater than an other specified value (here 100 for example). I tried with a <code>.change</code> and <code>parseInt</code> (with radix) but something wrong. Anyone know how to do it ?</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;!-- First list --&gt;
&lt;div class="form-group"&gt;
    &lt;label for="first"&gt;First list&lt;/label&gt;
        &lt;select id="first" class="form-control" role="listbox" onchange="filterList();"&gt;
            &lt;option value="Select level 1" selected="selected"&gt;Select...&lt;/option&gt;
            &lt;option value="Option 1"&gt;Option 1&lt;/option&gt;
            &lt;option value="Option 2"&gt;Option 2&lt;/option&gt;
        &lt;/select&gt;
&lt;/div&gt;
&lt;!-- Second list --&gt;
&lt;div class="form-group"&gt;
    &lt;label for="second"&gt;Second list&lt;/label&gt;
        &lt;select id="second" class="form-control" role="listbox" onchange="parametres();"&gt;
            &lt;option value="Select level 2" data-group="Select" selected="selected"&gt;Select...&lt;/option&gt;
            &lt;option value="Option 1 - 1" data-group="Option 1"&gt;First list 1 - Element 1&lt;/option&gt;
            &lt;option value="Option 1 - 2" data-group="Option 1"&gt;First list 1 - Element 2&lt;/option&gt;
            &lt;option value="Option 2 - 1" data-group="Option 2"&gt;First list 2 - Element 1&lt;/option&gt;
            &lt;option value="Option 2 - 2" data-group="Option 2"&gt;First list 2 - Element 2&lt;/option&gt;
        &lt;/select&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;!-- Parameter 1 --&gt;
&lt;div class="container" id="table_param" style="visibility: hidden;"&gt;
    &lt;table class="table table-striped"&gt;
        &lt;thead&gt;
      &lt;tr&gt;
                &lt;th&gt;Parametre&lt;/th&gt;
  &lt;th&gt;Value&lt;/th&gt;
  &lt;th&gt;Measurement unit&lt;/th&gt;
  &lt;/tr&gt;
        &lt;/thead&gt;
 &lt;tbody&gt;
     &lt;tr&gt;
        &lt;td&gt;Param1&lt;/td&gt;
   &lt;td&gt;     
             &lt;div id="param1" style="visibility: hidden;"&gt;      
                 &lt;value data-param="First list 1 - Element 1"&gt;130&lt;/value&gt;
                 &lt;value data-param="First list 1 - Element 2"&gt;91&lt;/value&gt;
                 &lt;value data-param="First list 2 - Element 1"&gt;114&lt;/value&gt;
                 &lt;value data-param="First list 2 - Element 2"&gt;63&lt;/value&gt;
             &lt;/div&gt;
        &lt;/td&gt;
    &lt;td&gt;&lt;i&gt;&lt;h6&gt;g/100mg&lt;/h6&gt;&lt;/i&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/tbody&gt;
    &lt;/table&gt;
&lt;/div&gt;
&lt;!-- Containers --&gt;
&lt;span id="option-container" style="visibility: hidden; position:absolute;"&gt;&lt;/span&gt;
&lt;span id="option-container_param1" style="visibility: hidden; position:absolute;"&gt;&lt;/span&gt;
&lt;script&gt;
// Filter list
function filterList(){
    var first = $("#first").find('option:selected').text(); // stores first list selected elements
    $("#option-container").children().appendTo("#second"); // moves &lt;option&gt; contained in #option-container back to their &lt;select&gt;
    var toMove = $("#second").children("[data-group!='"+first+"']"); // selects elements to move out
    toMove.appendTo("#option-container"); // moves elements in #option-container
    $("#second").removeAttr("disabled"); // enables select
};
// Parameter 1
function parametres(){
    var second = $("#second").find('option:selected').text();
    $("#option-container_param1").children().appendTo("#param1");
    var toMove_param1 = $("#param1").children("[data-param!='"+second+"']");
    toMove_param1.appendTo("#option-container_param1");
    $("#param1").removeAttr("disabled");

  // Color text according to the value
  $("#param1").change(function(){
     if(parseFloat($("#param01").val(),10) &gt; 100){
        return $("#param01").css('color', 'red');
        } 
 })       

  document.getElementById("table_param").style.visibility="visible";          
    document.getElementById("param1").style.visibility="visible";
};
&lt;/script&gt;</code></pre>
</div>
</div>
</p>