It's been some time since I've used JQuery, so this might be something very obvious.
I am attempting to use JQuery to set the colour of all text inside <span> tags which has a class containing a certain keyword (in this example, the word inside the class tag is "var").
I then put this jQuery code into the body of the document:
$("class*='var'").css("color", "#FF00DC");
But this doesn't make any difference.
Is there a simple syntax error I'm making here or is this something a bit deeper? I've made a jsFiddle to try and illustrate the problem.
Thanks in advance.