0
Follows the code:
HTML:
<button id="meubotao"type="button" value="5">Click Me!</button>
JS:
$( "#meubotao" ).click(function() {
$("#myModal").modal("show");
});
I also have this code to follow (triggers this event after modal to be loaded):
$('#myModal').on('shown.bs.modal', function (e) {
// como obter valor a partir daqui...
})
The event click ("mypost"), I can get value using $(this).val();
or example of jsfiddle.
How can I get value from that button after modal to be loaded ?
Ever thought about putting this value in a variable? So you can use it wherever you want.
– Thiago
Yeah, I’ve thought about it, but it’s got to get direct value from the event ?
– Matheus Miranda
Ever tried to make
$('#meubotao').val()
after the Shown event of the modal?– fernandoandrade