I have this code:
$('a[rel="imagesHandler"]').hover(
function(){
var liWidth = $(this).width();
$(this).append('<div id="editBar"><a id="delPic" href="#"><img id ="piDe"src="./images/pic_del_icon.png" alt="" /></a></div>');
$('div#editBar')
.css({ 'width':liWidth - 3,
'height':'19px',
'padding-left':'3px',
'padding-top':'1px',
'float':'left',
'position':'relative',
'top':'-22px',
'z-index':200,
'background-color':'black',
'opacity':'0.5'
})
.hide()
.fadeIn('slow');
$('a#delPic').click(function(event){
event.stopPropagation();
alert('gigi');
return false;
});
},
function(){
$('div#editBar').hide('slow');
$('div#editBar').remove();
}
);
So, I will add that this pops up on the mouse, inside this div there is a # delPic. I changed the opacity of div # editBar to 0.5, but it applies to # delPic as well. So, I want to change the opacity of a # delPic to 1. How can I do this? I tried several versions. That's why I anchored this identifier (trying to select it right away), but it still doesn't work.
source
share