开发者

Issue with slideDown in IE

I have this line of code:

<SCRIPT type=text/javascript>$(document).ready(function(){$("#StraightFoods").next("div.menu_body").slideDown("slow");});</SCRIPT>

Here is the HTML for the section:

<div class="menu_head" id="StraightFoods" title="Straight Foods">
    <div title="#d99043" id="StraightFoods_colour"></div>
    <a rel="#d99043" href="http://URL/Category/0/Straight_Foods.html">Straight Foods</a>
</div>
<div class="menu_body">
    <div class="leftbox_item" id="SunflowerSeeds">
        <a rel="#d99043" href="http://URL/Category/0/Straight_Foods~Sunflower_Seeds.html"><span style="color: #d99043">Sunflower Seeds</span></a>
    </div>
    <div class="leftbox_item" id="PeanutKernels">
        <a href="http://URL/Category/0/Straight_Foods~Peanut_Kernels.html"><span style="color: #d99043">Peanut Kernels</span></a>
    </div>
    <div class="leftbox_item" id="StraightSeeds">开发者_C百科;
        <a href="http://URL/Category/0/Straight_Foods~Straight_Seeds.html"><span style="color: #d99043">Straight Seeds</span></a>
    </div>
</div>

that works in firefox but for some reason triggers errors in IE and stops the rest of the JQuery working on my page. When viewing in IE, I see errors loading the page which directs me to this section in JQuery.js:

Line 4031 Char 5:

jQuery.extend( jQuery.fx, {
    speeds:{
        slow: 600,
        fast: 200,
        // Default speed
        _default: 400
    },
    step: {

        opacity: function(fx){
            jQuery.attr(fx.elem.style, "opacity", fx.now);
        },

        _default: function(fx){
            if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
                fx.elem.style[ fx.prop ] = fx.now + fx.unit; //Error Line!!
            else
                fx.elem[ fx.prop ] = fx.now;
        }
    }
});

If I comment out the if / else section, my page works fine but keeping it in causes slideDown to break the rest of my page. Any ideas?


Not sure how but the problem seems to have gone away .... how odd. Would be interested to know if anyone else has had this issue though.

In hindsight, it was probably the version of JQuery I was using. I think I had an old one in my file for some reaon.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜