Hi all I've been stuck on this for four hours, and I still can't solve it!
I am trying to check if a list item has a class of selected, then is so change the opacity to 0.5. Here is my code: if ($("#portfolio #thumbs ul li").hasClass(".selected")) { $(this).css('opacity','0.5'); } It seems that the "this" part isn't working, is it to do with putting it in an event? Would appreciate any help