1
I have the following javascript code:
function chamarModal(valor) {
$('span.nome').text(valor);
$('#pagamento-modal').modal();
}
How do I set this variable content valor
in my modal bootstrap?
I tried the above code and other codes and it didn’t work
My modal:
<div class="modal fade" id="pagamento-modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Fechar"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="modalLabel">Registrar Pagamento</h4>
</div>
<div class="modal-body">Deseja realmente registrar o pagamento no valor de <b><span class="nome"></span></b>? </div>
<div class="modal-footer">
<a href="#" type="button" class="btn btn-primary pay-yes">Sim</a>
<button type="button" class="btn btn-default" data-dismiss="modal">Não</button>
</div>
</div>
</div>
</div>
I want to insert in this block:
<div class="modal-body">Deseja realmente registrar o pagamento no valor de <b><span class="nome"></span></b>? </div>