How to show buttons for each menu option?

Asked

Viewed 144 times

1

$(document).ready(function() {
  $("#myModal").modal('show');
  $('#myModal').on('show.bs.modal', function(e) {
    $('.chosen-select').chosen();
  });
});
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.min.css">

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  `enter code here`
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Add Group</h4>
      </div>


      <div class="modal-body">
                      <ul class="nav nav-tabs" id="myTab">
                    <li class="active"><a data-target="#home" data-toggle="tab">Opção 1</a></li>
                    <li><a data-target="#profile" data-toggle="tab">Opção 2</a></li>
                    <li><a data-target="#messages" data-toggle="tab">Opção 3</a></li>
                    <li><a data-target="#settings" data-toggle="tab">Settings</a></li>
                </ul>

                <div class="tab-content">
                    <div class="tab-pane active" id="home">
                        <br />
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <button type="button" id="gerarboleto" class="btn btn-primary center-block" data-dismiss="modal">Opção 1</button>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="profile">Opção 2</div>
                    <div class="tab-pane" id="messages">Opção 3</div>
                    <div class="tab-pane" id="settings">Oção 4</div>
                </div>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

In each menu I want to show different buttons, how can I do this?

Follow the image:

inserir a descrição da imagem aqui

  • What do you mean, different buttons? Type: https://jsfiddle.net/ufbr6uwv/9/ .

  • No, look at the image I posted, where there’s red circle

  • 1

    =I won’t be able to see.

1 answer

0

if you just want a formatting for your buttons you can insert a class class="btn-opcao-1" and add a CSS to it, so each button will be different from the other.

If you don’t have as much knowledge of css see on this link a tool that can help you with formatting, just copy the code and put it in your css file.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.