Last active
December 15, 2015 17:39
-
-
Save Bolinha1/5298450 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
while($r = mysql_fetch_array($sql)) | |
?> | |
<div class="menu"> | |
<input type="hidden" name="id_pedido" id="<?php echo $r['id']; ?>" value='<?php echo $r['id']; ?>'> | |
<input type="radio" name='status' class='status' value="feito" checked="checked"> | |
</div> | |
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.status').click(function() { | |
var status = $(this).val(); | |
var id = $('input:hidden').val(); | |
alert(id);//Só mostra do primeiro item que o laço iterou, não importa quantos seja. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment