I was wondering whether or not jQuery supports HTML5 elements.
For example, I tried this code but it fails with a rather weird error:
$('<progress value="2">').val();
It says:
TypeError: Object 1 has no method 'replace'
Is jQuery to support HTML5 elements in the future, or am I doing something wrong this way?
EDIT: It does not seem to be the selector: http://jsfiddle.net/z5t3g/
If you have your <progress />
element in the DOM:
<progress value="2" />
You can select it using jQuery, but it seems that (as of version 1.5) it doesn't know to return the value
attribute using the .val()
method. You need to check the attribute by name:
$('progress').attr('value');
Use a jquery selector for it
$("progress").val();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With