Transfer data-id to multiple modals

Ask A Question

Login To post a question

I have this table:

       <table class="table">
    <td class="detail">
       <a class="btn btn-default btn-xs" href="" data-email="<?php echo $us->email; ?>">Email</a>
<a class="btn btn-default btn-xs" href="" data-id="<?php echo $us->id; ?>">Profile</a>

And I get data-email value with this javascript:

$('.table .detail a').click(function(e) {
  var email = $(this).data('email');

    url: 'admin/send_email.php?token=<?php echo $token; ?>',
    data: {email: email},
    type: 'GET',
    dataType: 'HTML'
  }).done(function(resp) {
    $('#modalContent .modal-body').html(resp)

How I can get data-id in another modal? I have tried adding class id in class="btn btn-default btn-xs" but don’t work!

For more info please click here

Have a question or need a custom quote?