Reputation: 253
My site is developed with HTML5 and CSS3.
The Custom value is assigned in <li>
tag type attribute.
My problem is, IE 10 does not accept the custom value for type attribute. So its throwing the error and not loading the <ul>
content. There is no issues on other browsers.
Is there any way to make it work in IE 10.
Sorry. Here is the code. The <li>
tag is rendered via jquery like this
EntryElm[0].id = list[i].id;
EntryElm[0].type = list[i].type;
Upvotes: 0
Views: 389
Reputation: 253
Thanks for your answers.
If I change it as custom attribute, it needs major changes in my code.
As I am rendering the <li>
tag from jquery, I replaced this code
EntryElm[0].type = list[i].type;
with this
EntryElm.attr('type', list[i].type)
After that it works fine for me in IE 10.
Upvotes: 0
Reputation: 7017
You should use atributes that start with "data-".
<li class="user" data-name="John Resig" data-city="Boston"
data-lang="js" data-food="Bacon">
<b>John says:</b> <span>Hello, how are you?</span>
</li>
Take a look here: http://ejohn.org/blog/html-5-data-attributes/
And here is link to the topic in HTML5 specs.
Upvotes: 4