D
D
Daniil Sukhikh2018-03-15 17:08:58
JavaScript
Daniil Sukhikh, 2018-03-15 17:08:58

how to change progress in jquery

There is a code:
<progress value="" max="100">

$(document).ready(function() {
  $('button').click(function() {
    $('progress').val(20);
  });
});

How to add 20 to the progress every time you click on the button?
And how to do it smoothly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nick Sdk, 2018-03-15
@danchiksux

$('progress').val($('progress').val() + 20);
here to make it smooth
https://jsfiddle.net/r445dny7/3/

M
Mikhail Smykov, 2018-03-15
@Chronosms

$('progress').attr('value', '20');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question