kee*_*n3d 8 jquery html5 internet-explorer-8 jquery-templates
我可能要求太多,但我正在尝试使用ie8中的html5元素获取jQuery模板.我正在使用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>
Run Code Online (Sandbox Code Playgroud)
如果我将html5元素更改为divs,那么模板将在ie8中运行.我应该注意到这个模板适用于所有其他浏览器,没有什么大惊喜......
我把一个jsfiddle放在一起演示我的模板:http://jsfiddle.net/keegan3d/E6EbG/1/
反正有没有让这些html5元素在ie8中运行?
虽然这不是一个真正的答案,但我可以确认我遇到了类似的问题。在某些情况下,内容拒绝呈现,在其他情况下,针对 html5 元素的样式拒绝应用。将新的 html5 元素更改为 div 使一切都按我的预期工作。