Dynamic search of words in jquery

Random words are appended on different positions of the body, (function is continuously run by settimeout())
$('body').append('<span class="box" style="position:absolute;font-weight:bold;color:#'+
color + ';top:'+ top +'px;left:'+left+'px;">'+ randomWords +'</span>');

$("input").keyup(function(){
var textBoxValue = $( this ).val();

//input value is comparing with the elements in the body

$("body .box").each(function() {
    if($(this).text()==textBoxValue){
        $(this).remove();
        scoreupdate();
    });
});
Here instead of doing this is there any way to dynamically check each word and when typing each letter the correspondence letter should highlight and when the whole word matches the score should update.

Комментарии

Популярные сообщения из этого блога

Unable to construct Application instance [duplicate]

What is considered 'insulting a Muslim'? And is it a sin? If so, is it a minor or major scene?