Reputation: 1357
How is it possible that, being 'colonna' a simple string:
$('td.' + colonna).css('background-color','#ffddaa');
works correctly highlighting the background of the interesting cells, and:
$('td.' + colonna).contains('Catia').css('background-color','#ffddaa');
produces the error: "$('td.' + colonna).contains is not a function"?
Someone has an idea?
Thanks!
Upvotes: 1
Views: 1779
Reputation: 27244
I know this is way (way!) past due, but I asked another question and it would appear that the net result is "old versions of JQuery had a .contains()
method, but it has been deprecated." Yay for breaking your API!
Upvotes: 0
Reputation: 6851
I believe it should be something like:
$('td.' + colonna + ":contains('Catia')").css('background-color','#ffddaa');
Upvotes: 9
Reputation: 66436
I don't have the specific answer, but it sounds like you would gain a lot by using a good JS debugger. I'd recommand Firebug.
Explanations on how to use it here: http://getfirebug.com/js.html
Like this you will be able to see the DOM, the different functions availables. If it doesn't fix it you'll still be able to post a more precise question.
Sorry for not being more helpful
Upvotes: 0