rpeg — 2010-01-16T01:01:12-05:00 — #1
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?
crmalibu — 2010-01-16T11:32:58-05:00 — #2
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?
rpeg — 2010-01-16T13:16:20-05:00 — #3
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.
crmalibu — 2010-01-16T13:48:03-05:00 — #4
Great. Go ahead and post that.
rpeg — 2010-01-16T14:02:00-05:00 — #5
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.