jquery - .load 在 IE8 中不工作 - 图片

标签 jquery css internet-explorer-8

您好,我在使 jQuery 在 IE8 中工作时遇到问题。我在 jQuery 方面不太擅长,但我想我可能已经定位了问题..

问题是,当您点击某个产品时,您应该会看到该产品的更大图片,但我认为它不会在 IE8 中加载图像。

这是我的 jQuery:

<script type='text/javascript'>
    $(document).ready(function(){
        $.ajaxSetup({cache:false});
        $("a.slidein").click(function(){
            var post_url = $(this).attr("href");
            var post_id = $(this).attr("rel");
            $("#post").html("<div style='width:100%; text-align:center;'><h2>LOADING...</h2></div>");

            $("#post").load(post_url);

            window.location.hash = post_id;

            return false;
        });
    });
</script>

这是网站:

http://kangaroos.dk.web2.redhost.dk/categories/shoes/

谢谢:)

最佳答案

可能与 jQuery load() doesn't work in IE8 & 7 中的问题相同 看起来您的标记已损坏 - 布局网格中的每个产品都嵌套在前一个产品中,缺少结束标记可能会破坏 IE 中的内容。

关于jquery - .load 在 IE8 中不工作 - 图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21327869/

相关文章:

jquery - Ajax Post 请求始终将 null 对象传递给 MVC Controller

javascript - 单击新的 UL LI 元素时关闭/隐藏先前的 UL LI 元素

asp.net - 通过 jQuery ajax 绑定(bind) GridView

css - 有没有办法让内容即使适合其父级也可以滚动?

javascript - 将一个表的内容复制到另一个表中

Jquery分割函数

javascript - 以编程方式按名称获取 FontAwesome unicode 值

html - 如何将周期性图像作为边框添加到 div

html - 创建适用于 IE8(桌面)的移动优先网站

asp.net - IE8 Win7 Facebook 连接问题