I have a script which displays search results after typing something in the input field. I want to mimic Google by making the text bold which is similar to the value of the input.
I tried this:
$(input).live('keyup', function(){
var makeBold = $('#Results').css("font-weight","bold");
if ($(input).val() == $('#Results').html()) {
makeBold();
}
});
The problem is that now everything is bold instead of just the matching value. How can I refer to the value and relate that to the Results?
Got it working using the link provided by @Michael Mior
The part of
.highlightrefers to the css which you can alter with bold or whatever.