Arkadaşlar;
Linkim bu:
<button type='button' class='btn btn-primary' data-toggle='modal' data-target='#kayitliKullaniciProfilleri' data-whatever='{$sonuc}'>Kullanıcılar</button>jQuery kodlarım bu:
$('#kayitliKullaniciProfilleri').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget) // Button that triggered the modal
var recipient = button.data('whatever') // Extract info from data-* attributes
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
var modal = $(this)
modal.find('.modal-title').text('Aranan Profil: ' + recipient)
})Popup kodlarımda bu:
<div class="modal fade" id="kayitliKullaniciProfilleri" tabindex="-1" role="dialog" aria-labelledby="kayitliKullaniciProfilleriLabel">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="kayitliKullaniciProfilleriLabel">.....</h4>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
Kodlarım şuan sorunsuz çalışıyor. $sonuc değişkenini popupda bulunan modal-title olarak linkle tıklandığında taşıyor. Bu modalt-title'a taşınan veriyi bir string değişkene atamak istiyorum. Bunu nasıl yapabilirim?