Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have used td .ms-vb2:contains but I need to match an exact value in a cell.

share|improve this question
    
You'll probably have to do some sort of for each loop, without any code to go off of and what the page output looks like, it'll be hardpressed to give you an exact answer. –  PirateEric May 16 '12 at 19:46
add comment

1 Answer

You can use the jQuery filter function to provide an exact match - http://api.jquery.com/filter/

For example:

$(document).ready(function(){ 

    $("td .ms-vb2").filter( function (index) {

       return $(this).text() == "Exact value to be matched";

    })
    .css("background-color", "red");

});

See this post - http://stackoverflow.com/questions/1883922/jquery-text-match

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.