jQuery Bootstrap Password Meter is not working
jQuery Bootstrap Password Meter is not working
我正在尝试为Twitter Bootstrap使用jQuery插件,该插件提供规则集以直观地显示用户输入密码的质量。
这就是该插件的工作方式...
但我的问题是,当我尝试在我的项目中使用它时,它似乎无法正常工作。文本相应地显示,但计量栏不起作用。.
这是我的 HTML -
<form class="form-horizontal">
<div class="form-group">
<label for="username" class="col-sm-3 control-label">username</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="username" placeholder="Username">
</div>
</div>
<div class="form-group">
<label for="password" class="col-sm-3 control-label">Password</label>
<div class="col-sm-5">
<input type="password" class="form-control" id="password" placeholder="Password">
</div>
</div> <div class="form-group">
<label for="strenth" class="col-sm-3 control-label">Strenth</label>
<div class="col-sm-5">
<!-- <div id="messages"></div> -->
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-5">
<button type="submit" class="btn btn-default">Sign in</button>
</div>
</div>
</form>
我的j查询 -
jQuery(document).ready(function () {
var options = {
onLoad: function () {
$('#messages').text('Start typing password');
},
onKeyUp: function (evt) {
$(evt.target).pwstrength("outputErrorList");
}
};
$(':password').pwstrength(options);
});
这是一个 JSBIN 与我到目前为止的所有代码
希望有人可以帮助我。谢谢。
将 css 路径替换为 http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css
在 head
标记
在此处查看更新的 JSBIN
相关文章:
- $rootScope not working
- jQuery document.ready not working
- Javascript getElementsByTagName not working?
- JQuery.val( ) not working
- Tomcat websocket is not working
- Javascript JSON.parse not working
- NodeJS Multer is not working
- Regex not working
- Ember run.debounce not working
- AngularJs 1 not working
- document.getElementById.style.backgroundImage not working
- Rxjs5, distinct() is not working
- createOscillator noteOn not working
- Javascript - .getHours() not working
- Javascript setTimeout not working | onkeydown
- MongoDB $pull not working
- Express router.use not working
- JSONP not working
- window.opener not working in chrome & IE
- Backbone + RequireJS: Collection.each() is not working