Vote count:
0
I'm currently learning javascript and jquery. I'm having a little trouble implementing "enter button" functionality once the text field has been filled. As of right now it only works when I click the button. I would really like to be able to hit enter and have the list item submitted. I'm working with a basic UL. Here's my code and I hope that was clear!
$('#addOne').submit(function(e) {
var value = $('#name').val();
$('ul').append('<li>' + value + '</li>');
});
asked 1 min ago
Adding "enter trigger" for submission
Aucun commentaire:
Enregistrer un commentaire