Skip to main content
removeu 4 caracteres do conteúdo
Fonte Link
Miguel
  • 29,5mil
  • 5
  • 43
  • 80

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
 

<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target); // mudar o url dinamicamente
    });
</script>

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
 

<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target); // mudar o url dinamicamente
    });
</script>

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target); // mudar o url dinamicamente
    });
</script>
adicionou 29 caracteres ao conteúdo
Fonte Link
Miguel
  • 29,5mil
  • 5
  • 43
  • 80

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target); // mudar o url dinamicamente
    });
</script>

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target);
    });
</script>

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target); // mudar o url dinamicamente
    });
</script>
adicionou 246 caracteres ao conteúdo
Fonte Link
Miguel
  • 29,5mil
  • 5
  • 43
  • 80

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target);
    });
</script>

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
</script>

Pode sim, aceda por exemplo a http://exemplo.com#listaReservas:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a data-target="#home" data-toggle="tab">home</a></li>
    <li><a data-target="#listaReservas" data-toggle="tab">Lista de Reservas</a></li>
    <li><a data-target="#lista-espera" data-toggle="tab">Lista de espera</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="home">Home</div>
    <div class="tab-pane" id="listaReservas">Lista de Reservas</div>
    <div class="tab-pane" id="lista-espera">Lista de espera</div>
</div>

<script>
    var tab_on = location.hash; // aqui é onde vamos agarrar o valor da hash do url (ex: #listaReservas)
    $('#myTab a[data-target="' +tab_on+ '"]').tab('show');
    $('#myTab a').on('click', function() {
        var this_target = $(this).data('target');
        var window_href = window.location.href.split('#')[0];
        history.pushState('', '', window_href+this_target);
    });
</script>
Post restaurado por Miguel
Post removido por Miguel
conteúdo editado
Fonte Link
Miguel
  • 29,5mil
  • 5
  • 43
  • 80
Carregando
Fonte Link
Miguel
  • 29,5mil
  • 5
  • 43
  • 80
Carregando