I am focusing on a WordPress site that utilizes a dynamically produced menu system that we can't modify becauase of future updates, but what Let me do is have the ability to change design for the written text within one <span> for the reason that menu with jQuery on document ready. The span is nested being an <li> item, and that i don't in the event that is important. (And That I aren't seeing WordPress creating a difference, either.) You will find other <span>'s and I'm not going these to change, so I have to match the particular text inside the <span> I wish to change.

Just how could I change this <span>We are here to help.</span>

for this

<span style="color:#123456;">We are here to help.</span>

on $(document).ready ?

The entire html is

<ul id="nav"><li class="li_item"><a class="navlink" href="http://www.mysite.org/contact-us/"><strong>Contact Us</strong><span>We are here to help.</span></a></li></ul>

Update: This works have to wrap the function within an alias for no conflicts:

jQuery(function($) {
$(document).ready(function() {
$("#nav li span:contains('We are here to help.')")
.css("color", "#f8481c"); 
});
});

Do this (assumes nav may be the id from the ul for the menu system):

$(document).ready(function() {
    $("#nav li span:contains('Text text text')")
      .css("color", "#123456"); 
});

For the example this jsFiddle works:

This will work when the :consists of is not on your side.

$(function() {
  $('#nav li span').each(function() {
    if ($(this).text() === 'We are here to help.')
      $(this).css('color', '#123456');
  });
});

Edit: a lot of parentheses.