IE8 jQuery FadeTo [英] IE8 jQuery FadeTo

查看:111
本文介绍了IE8 jQuery FadeTo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML标记:

    <ul id="portfolio"><li class="web">
            <span class="info">August 2007 <a href="http://awebsite.com" rel="external">visit</a></span>
            <a href="/assets/image.jpg" class="fancybox" rel="web">
                <img src="/assets/imagelarge.jpg" alt="Rising Star Ranch" />
                <span class="title">Some Title</span> Some other text...
            </a>
        </li>
    </ul>

jQuery:

$("ul#portfolio li").fadeTo("slow", 0.3);

在Firefox 3和3.5以及IE7中,此行为符合预期并淡化了礼。在IE8中,一切都没有消失,调试时也没有出现Javascript错误。

In Firefox 3 and 3.5 as well as IE7, this behaves as expected and fades out all elements within the 'li'. In IE8, nothing is faded at all, and no Javascript errors show up when debugging.

该页面位于
http://joecoledesign.com/portfolio

谢谢!

推荐答案

你是否试过在ul#portfolio li周围加上引号?选择器只是一个字符串,因此它需要引号。没有引号即使在我的Firefox中也不起作用。

Have you tried putting quotes around ul#portfolio li ? The selector is just a string, so it needs quotes. Without quotes doesn't work even in my Firefox.

$("ul#portfolio li").fadeTo("slow", 0.3);

编辑:好的,尝试将淡入淡出应用于所有子元素:span和img逐个启动。它确实可能是一个IE错误。

OK, try to apply the fade to all subelements: span and img one by one for starters. It could indeed be an IE bug.

编辑:你也错过了关于id =投资组合的收盘报价。来吧,伙计,在发布之前尝试解决这些问题。

you are also missing a closing quote on the id="portfolio". Come on, man, try to work these things out before you post.

编辑:顺便说一句,以上在IE8中运行正常 - 我只是将它放在一起并把它扔了进入一个空白的IE8页面 - 整个事情都消失了。

btw, the above works fine in IE8 - I just put it together and threw it up into a blank IE8 page - the whole thing faded.

编辑:很可能你网页上的其他东西正在做它,因为它可以很好地独立运行。

It's quite possible something else on your page is doing it as it works fine standalone.

这篇关于IE8 jQuery FadeTo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆