run passStrength after loading page with ajax

This commit is contained in:
Uwe Steinmann 2018-06-21 17:55:51 +02:00
parent 4209b1033a
commit 60a71e2397

View File

@ -381,6 +381,20 @@ $(document).ready( function() {
width: '100%',
templateResult: chzn_template_func
});
$(".pwd").passStrength({ /* {{{ */
url: "../op/op.Ajax.php",
onChange: function(data, target) {
pwsp = 100*data.score;
$('#'+target+' div.bar').width(pwsp+'%');
if(data.ok) {
$('#'+target+' div.bar').removeClass('bar-danger');
$('#'+target+' div.bar').addClass('bar-success');
} else {
$('#'+target+' div.bar').removeClass('bar-success');
$('#'+target+' div.bar').addClass('bar-danger');
}
}
}); /* }}} */
});
}); /* }}} */