开发者

MooTools DOMReady not firing in IE7 if attached after DOM is ready through yepnope

I am using yepnope to load my scripts, but when using IE7, it won't fire the Mootools domready OR load events if they have already been fired. Any idea why?

Here is the code.

yepnope([
    {
        load: "/js/uncompressed/mootools.js",
        callback: function () {
            if (Browser.ie && Browser.version.toFloat() < 8) {
                yepnope([
                    {
 开发者_如何学编程                       load: "/js/uncompressed/ie.js",
                        complete: function () {
                            window.addEvent("domready", function () {
                                setupForIE();
                            });
                        }
                    }
                ]);
            }
        }
    }
]);

Using MooTools version 1.3.2 (no compat) and yepnope bundled with Modernizr.

After more testing, it seems that IE9 and IE8 aren't firing the domready either.


Because you are loading Mootools "Asyncronously", maybe the js-Library loading after the DOMContentLoaded - event has already fired, thus your function not got executed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜