Issue
I am using ivirabyan/jquery-mentions in my project. i can do ajax request, but the problem is how can i use the response
$('textarea.mentions').mentionsInput({
source: function( request, response ) {
$.ajax({
url: rootPath() + "user/tagFriends/" + request.term,
type: "GET",
dataType: "json",
success: function(data){
alert(data);
// found data here
}
});
},
showAtCaret: true
});
Thanks in advance.
Solution
You can try this code, it may work
$('textarea.mentions').mentionsInput({
source: function( request, response ) {
$.ajax({
url: rootPath() + "user/tagFriends/" + request.term,
type: "GET",
dataType: "json",
success: function(data){
response(data);
// Just add this line
}
});
},
showAtCaret: true
});
Answered By - Snehasish Sarker
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.