【发布时间】:2011-09-07 16:31:40
【问题描述】:
我用 .load() 这个函数加载我的内容:
$(document).ready(function(){
$("nav a").click(function () {
$("#main-content").load($(this).attr("href") + " #content > *");
return false;
});
});
index.php 包含样式和脚本。
加载的内容只包含 div 中的内容,没有头部、主体或样式。
问题:
- IE8 不加载样式并且此功能不起作用:
$(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);
}
);
}
});
我已经尝试像其他脚本一样修复它:
$(document).ajaxComplete(function(){ });
..但它没有工作。
非常感谢任何帮助。
【问题讨论】:
标签: jquery css internet-explorer