[jQuery] Change opacity of item with class of selected
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