Today, I created an HTML and jQuery code for changing the color of specific classes on page load. However, it's not working on my server. When I checked it on JSFiddle, it was working fine. Can anyone explain what's wrong with this code?
<script type="text/javascript">
$('.Pending').css('color', 'red');
$('.Approved').css('color', 'green');
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<span class="Approved">Approved</span>
<span class="Pending">Pending</span>