diff options
-rw-r--r-- | jquery.strengthify.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jquery.strengthify.js b/jquery.strengthify.js index 9616249..41d9f6a 100644 --- a/jquery.strengthify.js +++ b/jquery.strengthify.js @@ -54,6 +54,8 @@ .append('<div class="strengthify-separator" style="left: 50%" />') .append('<div class="strengthify-separator" style="left: 75%" />') + var oldDisplayState = $('.strengthify-wrapper').css('display') + $.ajax({ cache: true, dataType: 'script', @@ -65,7 +67,7 @@ // hide strengthigy if no input is provided $('.strengthify-wrapper').css( 'display', - (password === '') ? 'none' : 'inline-block' + (password === '') ? oldDisplayState : 'inline-block' ) // calculate result @@ -102,6 +104,11 @@ options.titles[result.score] ) + // reset state for empty string password + if(password === '') { + $('.strengthify-container').css('width', 0) + } + }) }) |