【发布时间】:2011-07-07 14:33:42
【问题描述】:
我可能要求的太多了,但我正在尝试让带有 html5 元素的 jQuery 模板在 ie8 中工作。我正在使用 head.js 以便注册 html5 元素,我也尝试了 html5shiv 但没有运气。页面中还有其他 html5 元素可以正常工作,但是如果我在模板中使用 html5 元素,jquery 模板系统不会返回任何内容。
这是我的一个模板的示例:
<aside>
<script id="sidebar-template" type="text/x-jquery-tmpl">
<section>
<header>${name}</header>
<section>
{{each links}}
<a href="${link}" class="${icon}">${name}</a>
{{/each}}
</section>
</section>
</script>
</aside>
如果我将 html5 元素更改为 div 并填充模板在 ie8 中工作。我应该注意到这个模板适用于所有其他浏览器,这并不奇怪......
我整理了一个 jsfiddle 来展示我的模板:http://jsfiddle.net/keegan3d/E6EbG/1/
有没有办法让这些 html5 元素在 ie8 中工作?
【问题讨论】:
标签: jquery html internet-explorer-8 jquery-templates