This is the jQuery code:
$("#web").hover(
function () {
$(this).css({
'background-color': '#ecf5fb',
'cursor': 'pointer',
'border': '1px solid #378ac4'
})
.children("a").children("img").attr("src", "1.png")
.end().children("p").css("opacity", "1.0");
$('#commentweb').stop(true, true).fadeIn();
},
function () {
$(this).css({
'background-color': '#e8e3e3',
'border': '1px solid grey'
})
.children("a").children("img").attr("src", "2.png")
.end().children("p").css("opacity", "0.5");
$('#commentweb').stop(true, true).fadeOut();
}
);
The problem is that the opacity is not changed, while everything else works. But if instead of this code I write
$(this).css({
'background-color': '#ecf5fb',
'cursor': 'pointer',
'border': '1px solid #378ac4'
})
.children("a").children("img").attr("src", "1.png");
$(this).children("p").css("opacity", "1.0");
it works. Why is this happening?
Here is the fiddle: http://jsfiddle.net/mMB3F/6/
'cursor': 'pointer !important'?