I want to implement Jira like auto complete behavior for one of my pet project. Check following screenshot.
I have searched hard for any existing plugin that could able to deliver it but couldn't find anyone.
I have tried following things (JsFiddle Link):
textarea
and input
(hidden initially) field elements. keyPress
event on textarea
@
key and showing input
field enabled with jQuery#autocomplete
plugin with list of users HTML:
<div class='span12'>
<textarea id='comments' class='span12'></textarea>
<input id='users' class='span12 hide' />
</div>
Script:
$(function() {
var users = [
"Ram",
"Ramesh",
"Rakesh",
"Rahul",
"Abhi",
"Karan"
];
$('#comments').on('keypress', function(e){
if(e.keyCode === 64) {
$( "#users" ).removeClass('hide');
$( "#users" ).autocomplete({
source: users
});
}
});
});
My questions are:
@text
to show auto-complete list with text
as selected?textarea
?Following are the three JavaScript plugins I found which serves the purpose I am looking for:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With