CSS未应用于通过IE7中的AJAX加载的内容

时间:2012-01-19 17:58:56

标签: css ajax internet-explorer-7

我特意遇到IE7的问题。我有一个标签内容区域,每个标签的内容都是通过AJAX加载的。这在FF和Chrome中运行良好,但IE7会错误地呈现AJAX加载的内容。好像有些CSS样式只在AJAX调用之后才会被应用。

JS:

// Set up the AJAX object parameters
var tabOptions = {
    type: 'GET',
    cache: false,
    url: '/wp-content/themes/iview/ajax/latest-posts.php',
    dataType: 'text',
    error: function(xhr, textStatus, errorThrown, XMLHttpRequest) {
        $('<p>Sorry, your request could not be completed at the moment due to ' + errorThrown + ' </p>')
            .appendTo('#tabbed-content')
    },
    success: function(html, textStatus) {
        $('#tabbed-content').find('#loader')
                            .remove()
                            .end()
                            .find('.jspPane')
                            .append(html);
    }
}

1 个答案:

答案 0 :(得分:0)

可能有两个具有相同ID的元素。确保#tabbed-content的内容没有已使用id的元素。