parent class problem (actualy me being noob problem)
Hi,
I'm trying to put a css opacity effect on certain elements.
then change it on mouse over.
that works,
now i want to exclude 1 of them that has a child with a different class then the others.
let me give an example:
this is working (got it from somewhere on the net)
$(function(opacity_thumbs) {
// set opacity for all thumbs to 30%
$("div.thumb").css("opacity","0.3");
// on mouse over
$("div.thumb").hover(function () {
// set opacity to 100%
$(this).stop().animate({
opacity: 1.0
}, "fast");
},
// on mouse out
function () {
// set opacity back to 30%
$(this).stop().animate({
opacity: 0.3
}, "normal");
});
});
now i want to exclude the active thumb from being set to opacity 30%
it also has to work when the active thumb changes...
generated html code looks like this:
<div id="thumb_container">
<div style="opacity: 0.3;" id="thumb0" class="thumb">
<img class="active_thumb" id="a_0" onclick='JavaScript:refresh("a_0","111.jpg");' src="category/badkamer/thumbnails/111.jpg">
</div>
<div style="opacity: 0.3;" id="thumb1" class="thumb">
<img class="cellborder" id="a_1" onclick='JavaScript:refresh("a_1","222.jpg");' src="category/badkamer/thumbnails/222.jpg">
</div>
etc
i was thinking something like:
$('img.active_thumb').parent().css('opacity', '1.0');
but how to get that into previous script?
anyone has some free time to help?
thx