I have the following button:
<button class="btn btn-default botao_leitura_biometrica" id="" style='border: solid 1px #666'>Lectura Biométrica</button>
This should open a modal:
<div class="modal modal-lg leitura_biometrica_modal" id="leitura_biometrica_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="z-index: 99999 !important;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title titulo-modal" id="myModalLabel">Busquéda por Lectura Biométrica</h4>
</div>
<div class="modal-body conteudo-modal-pesquisa">
Coloque o dedão
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancelar" data-dismiss="modal">Cancelar</button>
<a class="btn btn-danger btn-ok">Pesquisar agora!</a>
</div>
</div>
</div>
</div>
So long, okay! On the first click, it opened normally. I clicked the close button, and clicked again to open.
And when you click on the second or next times before reload, the following error appears:
Uncaught TypeError: $ (...). modal is not a function
This is the opening jQuery:
$(".botao_leitura_biometrica").click(function(){
$(".leitura_biometrica_modal").modal('show');
var url = BASE_URL + 'ajax/pesquisar_digital';
$(".conteudo-modal-pesquisa").load(url);
});