Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何为Twitter引导更改JQuery密码强度表的位置?_Jquery_Twitter Bootstrap - Fatal编程技术网

如何为Twitter引导更改JQuery密码强度表的位置?

如何为Twitter引导更改JQuery密码强度表的位置?,jquery,twitter-bootstrap,Jquery,Twitter Bootstrap,我正试图把仪表放在我的密码栏旁边,而不是下面,这是它的图像,显示了它现在的样子。。 像这样放置它的代码是 <div class="form-group" id="pwd-container"> <label for="txtPassword" class="control-label col-md-2" id="lblAdministrationAdministratorPassword"><b>Password:</b></labe

我正试图把仪表放在我的密码栏旁边,而不是下面,这是它的图像,显示了它现在的样子。。 像这样放置它的代码是

<div class="form-group" id="pwd-container">
    <label for="txtPassword" class="control-label col-md-2" id="lblAdministrationAdministratorPassword"><b>Password:</b></label>
    <div class="col-md-6">
        <input id="txtPassword" type="password" class="form-control" name="password" />
    </div>
    <div class="col-sm-4">
        <div class="pwstrength_viewport_progress"></div>
    </div>
</div>

密码:
我想让它看起来像这样。。

JSFiddle


密码:
坚强的

只需添加float left,就完成了

您必须将div、input和label分隔成带列的单独div,以便所有div都保持在同一行中

您的格式如下所示

jQuery(文档).ready(函数(){
“严格使用”;
var选项={};
options.ui={
容器:“pwd容器”,
ShowVerdictionsInSideProgressBar:正确,
视口:{
进度:“.pwstrength\u viewport\u进度”
}
};
options.common={
是的,
onLoad:function(){
$('#messages').text('开始键入密码');
}
};
$(':password').pwstrength(选项);
});

暗语

使用
输入组
。也许对你有帮助。如果没有帮助,请提供一个提琴。@JSantosh,我想提供一个提琴,但我不知道如何向其中添加javascript文件,因为我认为这个javascript没有CDN,我是在GitHub上找到的。不过,我注意到,当我试图移动它时,它看起来像是附加到输入上的。因此,无论我将输入置于inputCDN的正下方何处,都不是强制性的,只要在github中以
raw
模式打开文件,然后复制链接并使用it@JSantosh我把所有的东西都整理好了,我做了编辑。我将JS文件内容添加到javascript部分区域,它看起来不像我的屏幕截图,但它在我的视图中发生了很多事情,即使仪表现在位置正确,在密码下面仍然有一个很小的仪表版本
<div class="form-group">
                    <label id="lblAdministrationAdministratorPassword" class="control-label col-md-2" for="txtPassword"><b>Password:</b></label>
                    <div class="col-md-6">
                        <input type="password" name="password" class="form-control" id="txtPassword">
                    </div>
                    <div class="col-sm-4">
                        <input type="password" id="rightHere" style="float: left;"><div class="progress" style="float: left;"><div class="progress-bar progress-bar-warning" style="width: 76%;"><span class="password-verdict">Strong</span></div></div>
                    </div>
                </div>