title: how create if for option in select?
body: <p>How can I create if for option in select? The code works, it is necessary to code only worked for option = 5</p>
  
  <pre><code>&lt;select id="select&lt;?php echo $product['id_product'];?&gt;" name="status_id" class="form-control" onchange="changeFunction(&lt;?php echo $product['id_product'];?&gt;)"&gt;
      &lt;?php foreach ($statuses as $status) { ?&gt;
          &lt;option id="option&lt;?php echo $product['id_product'];?&gt;" value="&lt;?php echo $status['id_product_status'];?&gt;"
              &lt;?php if ($status['id_product_status'] == $product['id_product_status']) { ?&gt; selected="selected"&lt;?php } ?&gt;&gt;
              &lt;?php echo $status['name_product_status']; ?&gt;
              &lt;/option&gt;
          &lt;?php } ?&gt;
          &lt;textarea id="onchange&lt;?php echo $product['id_product'];?&gt;" style="visibility: hidden" "&gt;&lt;/textarea&gt;
  &lt;/select&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>function changeFunction(item) {  
      if ($("#option" + item).val == 5) {
          var selectOption = document.querySelector("#onchange" + item);
          selectOption.setAttribute('style', 'visibility: visible');
      }
  }
  </code></pre>