hi...
i'm trying to code a site, you can see it at
http://derrickkwa.com/6amb/index.html
so far, i've only implemented the first link in the navigation menu
(work -> equipment), and clicking on the logo brings it back to the
home page.
here's my question, though. it works perfectly fine in firefox, the
remote div content is loaded perfectly, and the content container
animates accordingly. in ie 7, however, it seems as if the div content
for the "equipment" page is not being loaded, and it's only showing
the background image for that page.
any thoughts on why that is - and how i can fix it?
the code i'm using for the navigation menu is this:
$(".sub-nav").children("li").children("a").click(
function(event){
//set current block
currentblock = $(this).parent("li").parent("ul").parent("li").attr
('id');
//set current link and bold it
if (currentlink != '') {
currentlink = this;
}
else {
$(currentlink).css('color','#666666').css('font-weight', 'normal'); //
set old link back to normal
currentlink = this;
$(currentlink).css('color','#000000').css('font-weight', 'bold'); //
set current link to hold
}
var toLoad = $(this).attr('href')+' #content-wrapper';
$('#content-wrapper').slideUp('Normal',loadContent);
$('#load').remove();
$('#page-container').append('<span id="load">LOADING...</span>');
$('#load').fadeIn('normal');
var pagename=$(this).attr('href').substr(0,$(this).attr
('href').length-5);
window.location.hash = pagename;
function loadContent() {
alert(toLoad);
$('#content-wrapper').load(toLoad,'',showNewContent());
}
function showNewContent() {
backgroundurl = 'url(images/backgrounds/'+pagename+'.jpg)';
$('#content-wrapper').slideDown('normal',hideLoader());
$('#content-wrapper').css('background-image',backgroundurl);
}
function hideLoader() {
$('#load').fadeOut('normal');
}
return false;
});
thanks,
derrick