This issue is driving me absolutely bonkers and I really appreciate any assistance! For some odd reason Chrome will sometimes not show the background images on a site I recently developed. I think it has something to do with a a Chrome cache issue and I've attempted all fixes in other posts on this site. The site works fine with Safari and Firefox on the Mac...
When clicking on each button for Watch, About, Filmmakers, Press, Contact I'm using jquery to fadein each div and fadeout all other divs. The background image for each page is defined in my css file. Each div has it's own background-image:url defined as well as properties defined for all.
#watch, #story, #about, #cast, #filmmakers, #press, #contact {
position:absolute;
top:190px;
left:50%;
margin-left:-575px;
width:955px;
height:608px;
display:none;
}
#watch{
background-image:url(../images/bg-watch.png);
}
#about{
background-image:url(../images/bg-about.png);
}
#filmmakers{
background-image:url(../images/bg-filmmakers.png);
}
#press{
background-image:url(../images/bg-press.png);
}
#contact{
background-image:url(../images/bg-contact.png);
}
and the javascript to define the fadein and fadeout buttons.
$(document).ready(function() {
$("a.watchBtn").click(function() {
$("#about").fadeOut();
$("#filmmakers").fadeOut();
$("#press").fadeOut();
$("#contact").fadeOut();
$("#inkguy").fadeOut();
$("#paperguy").fadeOut();
$("#centertext").fadeOut();
$("#watch").fadeIn();
});
$("a.aboutBtn").click(function() {
$("#watch").fadeOut();
$("#filmmakers").fadeOut();
$("#press").fadeOut();
$("#contact").fadeOut();
$("#inkguy").fadeOut();
$("#paperguy").fadeOut();
$("#centertext").fadeOut();
$("#about").fadeIn();
});
$("a.filmmakersBtn").click(function() {
$("#watch").fadeOut();
$("#about").fadeOut();
$("#press").fadeOut();
$("#contact").fadeOut();
$("#inkguy").fadeOut();
$("#paperguy").fadeOut();
$("#centertext").fadeOut();
$("#filmmakers").fadeIn();
});
$("a.pressBtn").click(function() {
$("#watch").fadeOut();
$("#about").fadeOut();
$("#filmmakers").fadeOut();
$("#contact").fadeOut();
$("#inkguy").fadeOut();
$("#paperguy").fadeOut();
$("#centertext").fadeOut();
$("#press").fadeIn();
});
$("a.contactBtn").click(function() {
$("#watch").fadeOut();
$("#about").fadeOut();
$("#filmmakers").fadeOut();
$("#press").fadeOut();
$("#inkguy").fadeOut();
$("#paperguy").fadeOut();
$("#centertext").fadeOut();
$("#contact").fadeIn();
});
});
If anyone can replicate this issue please let me know. All it takes is to refresh the page and click on the buttons for it not to work on my end. The site is having this issue even after I clear the cache and test it locally. In Dreamweaver it works exactly fine. The other odd thing is that the elements of the div load properly - such as link buttons that are png files with tags... so I know the divs are fading in but just not the backgrounds!
Thanks SO much!