I am trying to show the text color change dynamically based on the condition that i am using in the code.Below is the code that i am using.Please help me out from this problem.
<span class="pendtext" style="font-size:15px;">{{($duepay->status == 'issued') ? 'PENDING' : (($duepay->status == 'paid') ? 'SUCCESSFUL' : $duepay->status)}}</span>
<script>
if($duepay->status == 'issued'){
$(".pendtext").css('color','green');
}
else{
$(".pendtext").css('color','yellow');
}
</script>