Reputation: 1
i have this:
for(y=0; y<numbers_sold.length; y++){
$("#stickers a:contains('" + numbers_sold[y] + "')").addClass('sold');
}
It doesn't work. If substitute the variable numbers_sold
by a number it works...
Can you help?
Thanks.
Upvotes: 0
Views: 477
Reputation: 2256
what is here not working? It works for me. see http://jsfiddle.net/3Du3K/
Upvotes: 1
Reputation: 264
Have you tried something like this?
$.each(numbers_sold, function(i, val){
$("#stickers a:contains('" + val + "')").addClass('sold');
});
Upvotes: 0