I'm trying to write a password strength function. When a user types in a password it shows them whether their password is "weak","good", or "strong" using a meter and text.
However if a user typed a weak password and deleted their password in the input field then proceeds to type a strong password the meter will show as strong however the text stays as "weak" since that is the last password they typed before erasing their text. Here is my query. I have tried both .text and .html but they both give me the same results
Here is a link to the code. It works on JFiddle but it doesn't work on my website!
Code in JFiddle link