如何在IE 9上使用jquery.initialize插件

时间:2017-02-06 15:41:39

标签: jquery

我正在使用jQuery Intialize Plugin(https://github.com/timpler/jquery.initialize),它在现代浏览器上运行良好。

不幸的是,我必须支持Internet Explorer 9/10,其中jquery.initialize插件不起作用。在Intialize插件的自述文件中有一个IE9和IE10的注释:

  

注意:要使其在IE9和IE10上运行,您需要在此处添加MutationObserver polyfill:https://github.com/webcomponents/webcomponentsjs

在Intialize插件的演示中,test.html中有另一个注释:

<head>
    <meta charset="UTF-8">
    <title>jquery.initialize test</title>
    <!-- Load MutationObserver and WeakMap polyfill for IE9 and 10 -->
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="jquery.initialize.js"></script>
</head>

我在test.html中包含了MutationObserver.js和WeakMap.js,但它仍然无法在IE9中运行: - (

1 个答案:

答案 0 :(得分:1)

基于this thread,您似乎需要使用此处提供的webcomponents.js版本0.5.2:

https://cdnjs.com/libraries/webcomponentsjs/0.5.2

相关问题