Reply Query
-
Will suggest more easy and less complicated approach and bootstrap
framework will handle the rest.
replace following
With
Use data-toggle
and data-target
attributes to open the modal and with additional data-id
attribute and show.bs.modal
or shown.bs.modal
modal events, can pass the value to modal
$(document).ready(function() {
$('#modal-6').on('show.bs.modal', function(e) {
var id = $(e.relatedTarget).data('id');
alert(id);
});
});
To keep the backdrop: 'static'
add it in Modal HTML Markup
- 热议问题