I'm trying to set the background colour of a span using jquery. I've used all functions in the title and all give me an error:
SCRIPT438: Object doesn't support property or method 'css'/'attr'/'addClass'
Any idea how I can solve this? All I want is to change the bg colour however I prefer if I can set the class.
code:
var liList = ul.find('li span');
$.each(liList, function(index, value){
if(value.innerText == currPage){
value.css('background-color', '#D94A38');
}
});