I'm trying to highlight words in green for OK, yellow for Fail and red for error.
I have the result in a variable. How do I search for this words and give 3 different classes for red,green,yellow?
//highlight words in the results
var results = $('#results').html();
console.log(results);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span id="results">Fail blabla Error asda OK</span>