I recently started building a website for one of my friends art projects and all has been good until now. I am using jQuery to make my bootstrap jumbotron fadeOut to 0.6 opacity when you hover, as well as making a new div with a button. The issue I am having is that when I hover over the jumbotron, it fades out and the button appears, however the button is also opaque. Please help me, I just recently finished the jQuery course on codecademy and am really excited to continue using it.
js fiddle - https://jsfiddle.net/rsgf7w3u/
Jquery
$(document).ready(function(){
$('.jumbotron').mouseenter(function(){
$('.jumbotron').stop().fadeTo('fast', .6);
$('.jumbotron').prepend('<div id="view-gallery"><button>View Gallery</button></div>');
});
$('.jumbotron').mouseleave(function(){
$('.jumbotron').stop().fadeTo('slow', 1);
$('#view-gallery').remove();
});
});
CSS
.jumbotron {
background-image:url("mc.jpg");
height:400px;
background-repeat:no-repeat;
background-size:cover;
}
#view-gallery button {
width:200px;
height:50px;
background-color:#2F2D30;
border-radius:1px;
border:none;
color:white;
}