I’m trying out some new HTML5 form features in the latest version of Opera.
<progress value="1" max="10"></progress>
What I want to do is to get the current value of the progress bar using jQuery.
I tried…
$(function(){
alert($('progress').val());
});
…but it didn’t do anything.
How can I get the current value using jQuery?
Using jQuery’s
val()threw an error for me, so I used the nativevalueproperty.jsFiddle.
If using < 1.6, then use
[0].valueto access the nativevalueproperty.