I load my content with .load() with this function:
$(document).ready(function(){
$("nav a").click(function () {
$("#main-content").load($(this).attr("href") + " #content > *");
return false;
});
});
index.php contains the style and scripts.
The loaded content just contains the content in a div without head, body or styles.
Problems:
- IE8 doesn't load styles & this function doesn't work:
$(document).ready(function() {
if ($(window).width() < 630) {
$('aside').each(
function(){
$(this).parents('article').find('h2').after(this);
}
);
}
if ($(window).width() > 630) {
$('aside').each(
function(){
$(this).parents('section').after(this);
}
);
}
});
$(window).bind('resize', function(){
if ($(window).width() < 630) {
$('aside').each(
function(){
$(this).parents('article').find('h2').after(this);
}
);
}
if ($(window).width() > 630) {
$('aside').each(
function(){
$(this).parents('section').after(this);
}
);
}
});
I already tried to fix it like the other scripts with:
$(document).ajaxComplete(function(){ });
..but it didn't work.
Any help is very apprechiated.