JSFiddle - React, Tailwind, and code Playground
by hunkyhari
HTML
<div class="order_box">
<h1>Order nr.: 2329268704685016576</h1>
<div class="delivery_info">
<span class="titles">Status:
<select class="order_status">
<option class="payment_received" value="Payment received">Payment received</option>
<option class="need_refund" value="Need to refund money">Need to refund money</option>
<option class="waiting_stock" value="Waiting for product/s stock">Waiting for product/s stock</option>
<option class="packing" value="Packing">Packing</option>
<option class="delivered" value="Delivered/Done" selected="selected">Delivered/Done</option>
</select>
</span>
</div>
</div>
JavaScript
$(".order_status").change(function(){
if($(".order_status option:selected").val()=="Payment received") {
$(this).attr('style','color:red;');
}else{
$(this).attr('style','color:black;');
}
});