test si display = none

Cela ne fonctionne pas, devrait-il? Ou pouvez-vous arrêter de l'erreur si une autre ligne pourrait faire de même:

function doTheHighlightning(searchTerms) {
    //loop through input array of search terms
    myArray = searchTerms.split(" ");
    for(i=0;i<myArray.length;i++)
    {
        //works. this line works if not out commented. Will highlight all words, also in the hidden elements
        //$('tbody').highlight(myArray[i]);

        //not working when trying to skip elements with display none...
        $('tbody').css('display') != 'none').highlight(myArray[i]);
    }

    //set background to yellow for highlighted words
    $(".highlight").css({ backgroundColor: "#FFFF88" });
}

J'ai besoin de filtrer les lignes dans une table et la couleur de certains mots. Les données a devenir façon beaucoup plus pour le coloriage si de nombreux mots sont choisis. Je vais donc essayer de limiter la coloration par la aucun éléments cachés.

InformationsquelleAutor Tillebeck | 2010-06-04