Reputation: 43
How would you make it so the P inside each .nav didn't fade?
$(document).ready(function () {
$('.nav').mouseenter(function () {
$(this).fadeTo('fast', .5);
});
$('.nav').mouseleave(function () {
$(this).fadeTo('fast', 1);
});
});
Upvotes: 2
Views: 75
Reputation: 144659
You are setting opacity of the element to 0.5, this affects the children too, I'd suggest:
.nav {
...
background: rgba(130, 202, 255, 1);
-moz-transition: all 400ms;
-webkit-transition: all 400ms;
transition: all 400ms;
}
.nav:hover {
background-color: rgba(130, 202, 255, 0.5);
}
Upvotes: 1