lundi 11 juin 2018

Button click does't alert div contents

I have three dynamically generated div. Each contains different data and buttons.On each button click I want to alert the data. I have this. but it only shows the first div data for each button click.

$('.button1').on('click', function(){
 var id = $('.id').val();
 alert(id);
});



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Jum6KL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire