Search
 
SCRIPT & CODE EXAMPLE
 

HTML

form filling progress bar html5

$("#form input").keyup(function() {

  var numValid = 0;
  $("#form input[required]").each(function() {
    if (this.validity.valid) {
      numValid++;
    }
  });

  var progress = $("#progress"),
    progressMessage = $("#progress-message");

  if (numValid == 0) {
    progress.attr("value", "0");
    progressMessage.text("Complete the form.");
  }
  if (numValid == 1) {
    progress.attr("value", "20");
    progressMessage.text("There you go, great start!");
  }
  if (numValid == 2) {
    progress.attr("value", "40");
    progressMessage.text("Nothing can stop you now.");
  }
  if (numValid == 3) {
    progress.attr("value", "60");
    progressMessage.text("You're basically a hero, right?");
  }
  if (numValid == 4) {
    progress.attr("value", "80");
    progressMessage.text("They are going to write songs about you.");
  }
  if (numValid == 5) {
    progress.attr("value", "95");
    progressMessage.text("SO CLOSE.");
  }

});
Comment

PREVIOUS NEXT
Code Example
Html :: javascript looparray 
Html :: html peseta symbol 
Html :: html banana script 
Html :: get all classes in a html file 
Html :: html5 development 
Html :: constellation css 
Html :: background instagram image in html 
Html :: dashboard box in adminlte 
Html :: search/find content ftp html 
Html :: ms crm aadhar number validation javascript 
Html :: how to disable movable textarea in html 
Html :: html tag link tittle bar 
Html :: html page in wordpress 
Html :: aria for icon links 
Html :: uwp remove splash screen 
Html :: aria-live for search results 
Html :: Div positioning HTML 
Html :: pass parameter 2 html button 
Html :: Metabox dos 
Html :: Google go to sprint in Encino 
Html :: 1 aed in rupees 
Html :: altair resize image embedded in html 
Html :: how to change style of specific part in html 
Html :: html textarea placeholder multiple lines 
Html :: alive 
Html :: cast2tv.net not working 
Html :: site language localize by ip 
Html :: star icon angular material 
Html :: thml text are 
Html :: how to add map in html 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =