Not sure if this is possible, but I'm trying to add a fade in to a jquery css change. I tried using the css transition attribute too, to no avail.
Here's how far I've got, but it's not working.
HTML:
<section id="primary" class="home-section-hero">
<div class="bcg" data-anchor-target="#primary">
<ul>
<li data-pid="1">
<img src=“folder/path”>
</li>
</ul>
</div> <!-- .bcg -->
</section> <!-- #primary -->
CSS:
#primary {
height: 100%;
width: 100%;
}
#primary .bcg {
background: url("images/miscreated-bg.jpg");
background-attachment: fixed;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
box-shadow: 10px 5px 15px rgba(0, 0, 0, 0.5) inset;
height: 100%;
text-shadow: 1px 0 1px rgba(0, 0, 0, 0.5);
width: 100%;
-webkit-transition-delay: 500ms;
-moz-transition-delay: 500ms;
-o-transition-delay: 500ms;
transition-delay: 500ms;
}
jQuery:
$( "li[data-pid='1'] img" ).click(function() {
$( "#primary .bcg" ).fadeIn( "slow", function() {
$(this).css( "background", "url(http://ericbrockmanwebsites.com/dev7/wp-content/themes/AntCas/player-images/bgs/Titanic-bg.jpg) no-repeat fixed center center / cover rgba(0, 0, 0, 0)");
});
});
Any insights?