10th November, 10:51
I have the following code but it doesn't seem to work properly.
JS Code
$(this).qtip({
overwrite: false,
content: {
text: 'Loading...',
title: 'Who liked this',
ajax: {
loading: false,
url: '/api_proxy/comments/'+cid+'/likes/',
type: 'GET',
dataType: 'json',
error: function() {
this.hide();
this.disable(true);
},
statusCode: {
204: function() {
this.hide();
this.disable(true);
}
},
success: function(json_reply, status) {
var linked_usernames = new Array();
for (var i=0; i<json_reply.length; i++) {
var avatarURL = json_reply[i].avatar_img.replace('/m/', '/m/xs/');
var link = '<div><a href="'+json_reply[i].url+'"><img src="'+avatarURL+'" style="max-width: 12px; max-height: 12px;" /> <span>'+json_reply[i].username+'</span></a></div>';
linked_usernames.push(link);
}
this.set('content.text', linked_usernames.join(''));
}
}
},
..... the rest of settings .....
![[Image: UpnqS.png]](http://i.imgur.com/UpnqS.png)