-1
I’m having a hard time implementing a pop-up button in jquery... I have a user list that are logged in to admin screen the admin can move the user The problem is that the button only shows the first user from the list
$('.comment-phara').on('click','#deslogar', function () {
var select = $('#deslogar').val();
alert(select);
Lobibox.notify('info', {
msg: 'Usuario deslogado já pode logar na estação.'
});
});
<?php
foreach ($logados as $usuarios){
echo '<li class="lista">'
. '<div class="comment-phara">'
. '<div class="comment-adminpr">'
. '<p class="dashtwo-messsage-title" id="id_usuario"/>' . $usuarios['nome_completo'] . '</p>'
. '</div>'
. '<div class="admin-comment-month">'
. '<p class="comment-clock"><i class="fa fa-clock-o"></i> Logou as 16:55</p>'
. '<br>'
. '<button class="btn btn-custon-four btn-primary btn-xs" id="deslogar" value="'. $usuarios['nome_completo'] .'">Deslogar</button>'
. '</div>'
. '</div>'
. '</li>';
}
?>
Perfect bombed with the $(this). val(); As I use the same button saved me man!! I will use the class also.
– Litle Rufus