I basically have this code currently:
<a href="#"><img class="thumb" src="pic.jpg"></a>
When I use the following Jquery code, it works and fades the entire div.
However, I only want to fade the <img> so I tried this:
The thumb class is only applied to that img. It does not work. What am I doing wrong?
The code looks correct. My guess would be you have some other issue. Try making a working html page that demonstrates the issue. Make it as minimal as possible. You'll probably figure out your issue while preparing it.
btw- what's the purpose of the <a> tag?
The original code is actually a part of a WP theme so the # is actually some PHP.
I tested it out and it is not working. I made a basic html page and switched the codes. Only works when it's a div. I even put the .thumb in the <a> instead and nothing. Hm.
I have another question. The code entails a <img> tag however when I view it in Firebug, it turns that <img> into a div with a background-image. However when I do a traditional "view source" it's just an <img> tag again. Does anyone understand why that is? I sense this is the actual problem.
Great. Go ahead and post that.
Well, you were right. I didn't simplify the code thoroughly enough and apparently it was this "baseline img" JS fix that messed it up. Damn, that delayed me. Thanks.