I'm looking to replace the开发者_运维百科 text inside a <nobr> but I can't figure out how.
It would be easy if I could do:
$('nobr:contains("Due")').replace('Due Date');
but there's another <nobr> that has the word "Due" in it and I don't want that affected.
What's the simplest way to find the <nobr> that's exactly equal to "Due" and replace it with "Due Date"?
You could filter all the nobr elements to eliminate any whose text is not equal to "Due":
$("nobr").filter(function() {
    return $(this).text() === "Due";
}).text("Due Date");
Here's a working example.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论