I have this code below for a calendar in sharepoint 2013 That when user choose car silver in the calendar field stay in silver color and when black stay in black color.
It works only in IE browser, in FireFox and Chrome does not work, does anyone have any idea what it might be?
<script src="/sites/SiteAssets/jquery-2.1.4.min.js"></script>
<style>
.black{
background-color: #383838;
}
.silver{
background-color: #C8C8C8;
}
</style><script type="text/javascript">
$(function(){
$('.ms-acal-item').each(function(){
$(':contains("Preto")',this).addClass('black');
$(':contains("Prata")',this).addClass('silver');
});
});
</script>