Follow 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 below (triggers this event after modal to be loaded):
$('#myModal').on('shown.bs.modal', function (e) {
// como obter valor a partir daqui...
})
The click event ("meubotão"), I can get value using $(this).val();
or example of jsfiddle .
How can I get value of this button after modal to be loaded?