Galera,
I have the following problem, I have a table and every record I have a link.
By clicking this link I get the ID as follows and call a modal.
<script>
$(document).on("click", "a", function(){
if ($(this).hasClass("clique")) {
var id = $(this).attr('id');
$('#md-default').modal('show');
}
});
</script>
In this modal I have a confirmation button, how can I get the id that I clicked on the link? Is there a way to declare a global variable and store it in the ID value and then retrieve it by clicking the other button?
<script>
$('#submitButton').click(function() {
alert("Como pegar o ID alterior??");
}
</script>