10

こんにちは、ブートストラップ 3.0.3 で使用しているフォーム ウィザードに問題があります。

実際には機能していますが、次と前のボタンは機能していませんが、ナビゲーションをクリックすると機能しています。

バージョンに互換性があるかどうかわかりません このプラグインをダウンロードしました

https://github.com/VinceG/twitter-bootstrap-wizard

しかし、ドキュメントには3.0.3と互換性があると書かれています

ブートストラップ 3.0.3 フォーム ウィザードで機能する提案はありますか?

ありがとうございました。あなたのコメントは高く評価されています:)

ここにスクリーンショットがあります

これは私のhtmlコードです

<div class="row">
        <div id="rootwizard">
            <ul>
                <li><a href="#tab1" data-toggle="tab"><span class="label">1</span> First</a></li>
                <li><a href="#tab2" data-toggle="tab"><span class="label">2</span> Second</a></li>
                <li><a href="#tab3" data-toggle="tab"><span class="label">3</span> Third</a></li>
                <li><a href="#tab4" data-toggle="tab"><span class="label">4</span> Forth</a></li>
                <li><a href="#tab5" data-toggle="tab"><span class="label">5</span> Fifth</a></li>
                <li><a href="#tab6" data-toggle="tab"><span class="label">6</span> Sixth</a></li>
                <li><a href="#tab7" data-toggle="tab"><span class="label">7</span> Seventh</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane" id="tab1">
                  1
                </div>
                <div class="tab-pane" id="tab2">
                  2
                </div>
                <div class="tab-pane" id="tab3">
                    3
                </div>
                <div class="tab-pane" id="tab4">
                    4
                </div>
                <div class="tab-pane" id="tab5">
                    5
                </div>
                <div class="tab-pane" id="tab6">
                    6
                </div>
                <div class="tab-pane" id="tab7">
                    7
                </div>
                <ul class="pager wizard">
                    <li class="previous first" style="display:none;"><a href="#">First</a></li>
                    <li class="previous"><a href="#">Previous</a></li>
                    <li class="next last" style="display:none;"><a href="#">Last</a></li>
                    <li class="next"><a href="#">Next</a></li>
                </ul>
            </div>  
        </div>
    </div>

これは私のCSSです

.bwizard-steps {
display: inline-block;
margin: 0; padding: 0;
background: #fff }
.bwizard-steps .active {
    color: #fff;
    background: #007ACC }
.bwizard-steps .active:after {
    border-left-color: #007ACC }
.bwizard-steps .active a {
    color: #fff;
    cursor: default }
.bwizard-steps .label {
    position: relative;
    top: -1px;
    margin: 0 5px 0 0; padding: 1px 5px 2px }
.bwizard-steps .active .label {
    background-color: #333;}
.bwizard-steps li {
    display: inline-block; position: relative;
    margin-right: 5px;
    padding: 12px 17px 10px 30px;
    *display: inline;
    *padding-left: 17px;
    background: #efefef;
    line-height: 18px;
    list-style: none;
    zoom: 1; }
.bwizard-steps li:first-child {
    padding-left: 12px;
    -moz-border-radius: 4px 0 0 4px;
    -webkit-border-radius: 4px 0 0 4px;
    border-radius: 4px 0 0 4px; }
.bwizard-steps li:first-child:before {
    border: none }
.bwizard-steps li:last-child {
    margin-right: 0;
    -moz-border-radius: 0 4px 4px 0;
    -webkit-border-radius: 0 4px 4px 0;
    border-radius: 0 4px 4px 0; }
.bwizard-steps li:last-child:after {
    border: none }
.bwizard-steps li:before {
    position: absolute;
    left: 0; top: 0;
    height: 0; width: 0;
    border-bottom: 20px inset transparent;
    border-left: 20px solid #fff;
    border-top: 20px inset transparent;
    content: "" }
.bwizard-steps li:after {
    position: absolute;
    right: -20px; top: 0;
    height: 0; width: 0;
    border-bottom: 20px inset transparent;
    border-left: 20px solid #efefef;
    border-top: 20px inset transparent;
    content: "";
    z-index: 2; }
.bwizard-steps a {
    color: #333 }
.bwizard-steps a:hover {
    text-decoration: none }
     .bwizard-steps.clickable li:not(.active) {
cursor: pointer }
    .bwizard-steps.clickable li:hover:not(.active) {
background: #ccc }
    .bwizard-steps.clickable li:hover:not(.active):after {
border-left-color: #ccc }
    .bwizard-steps.clickable li:hover:not(.active) a {
color: #08c }
    @media (max-width: 480px) { 
/* badges only on small screens */
.bwizard-steps li:after,
.bwizard-steps li:before {
    border: none }
.bwizard-steps li,
.bwizard-steps li.active,
.bwizard-steps li:first-child,
.bwizard-steps li:last-child {
    margin-right: 0;
    padding: 0;
    background-color: transparent }
     }

そして、これは私のJSです

    $(document).ready(function() {
    $('#rootwizard').bootstrapWizard({'tabClass': 'bwizard-steps'});    
    window.prettyPrint && prettyPrint()
}); 
4

5 に答える 5

1

bowerは更新されていません 。代わりに、 githubbootsrtap 3.xから zip をダウンロード してください。bootstrap 3.x

于 2015-08-24T18:10:01.100 に答える
1

GitHubから

ブートストラップ ウィザードの bower バージョンやその他のパッケージ マネージャーの更新は今後行われません。その理由については #81 を参照してください。代わりに「master」ブランチを使用してください。

使用するbower install twitter-bootstrap-wizard#master

于 2015-07-28T11:45:12.177 に答える
1

私もこの問題に直面しました。

3.0.3 はサポートしていません。

ブートストラップ 2.x バージョンでは問題なく動作しています。

バージョンを 2 に変更できないため、jQuery を使用しました。

$('#nextTab').click(function(){
 $('#navTab').find('.active').next().children().trigger('click');
})

$('#prevTab').click(function(){
  $('#navTab').find('.active').prev().children().trigger('click');
})

クラスを追加または削除して、ルック アンド フィールを向上させることができます。

于 2014-04-02T06:55:47.297 に答える
0

この問題は、ブートストラップ Javascript がブートストラップ ウィザードの JavaScript と互換性がないために発生します。ブートストラップ Javascript バージョン 2.3.2 を試しました。戻るボタンと次へボタンが機能し始めました。

この問題の解決策を説明する記事をここに書きました

http://codezag.com/bootstrap-wizard-next-button-not-working/

于 2016-06-11T18:32:57.187 に答える
0

私もこの問題を抱えていました。revox.io にバンドルされているブートストラップ ウィザードのバージョンは、ブートストラップのバージョンと互換性がありませんでした。最新バージョンについては、 https://github.com/VinceG/twitter-bootstrap-wizardを参照してください。

于 2016-01-23T01:16:21.060 に答える