$('input.typeahead').keypress(function (e) {
if (e.which == 13) {
var selectedValue = $('input.typeahead').data().ttView.dropdownView.getFirstSuggestion().datum.id;
$("#input_id").val(selectedValue); $('form').submit(); return true;
}
});
I appended the same information to this GitHub issue.
if (e.which == 13) {
var selectedValue = $('input.typeahead').data().ttView.dropdownView.getFirstSuggestion().datum.id;
$("#input_id").val(selectedValue); $('form').submit(); return true;
}
});
No comments:
Post a Comment