//Global Variable
value = '';
$('[href = #remoteModal]').click(function(event){
event.preventDefault();
value = $(this).data("id");
$('#remoteModal').show();
});
And I think you can access to value
variable everywhere in this page
var data-id = $(this).attr('data-id');
So here in data-id you wll get your "XYZ"
Use the .relatedTarget property mentioned in the Modal Event docs:
$(document).ready(function () {
$('#remoteModal').on('show.bs.modal', function (event) {
console.log($(event.relatedTarget).attr('data-id'));
});
});