html5 content not styled in JavascriptMVC+Modernizr
-
25-09-2019 - |
Question
I'm using Modernizr and JavascriptMVC.
Modernizr is in the head section.
<script src="./resources/js/modernizr-1.6.min.js"></script>
And steal before closing body:
<script type='text/javascript' src='../steal/steal.js?formcms,development'></script>
When I add some html5 content in the controller like this:
$('body').append(this.view('header'))
It is not styled.
Is there a solution to style html5 elements after adding them in a view in JavascriptMVC?
I'm using IE6.
Solution
Use innerShiv.
<script src="http://jdbartlett.github.com/innershiv/innershiv.js" type="text/javascript"></script>
then
$('body').append(innerShiv(this.view('header')));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow