Commit 5ca625e4 authored by hannes's avatar hannes

make .attachment.more ajax work with ajax-loaded content, i.e. infiniteScroll

parent c2fa3ca8
......@@ -856,18 +856,16 @@ var SN = { // StatusNet
return;
}
var attachment_more = notice.find('.attachment.more');
if (attachment_more.length > 0) {
$(attachment_more[0]).click(function () {
var m = $(this);
m.addClass(SN.C.S.Processing);
$.get(m.attr('href'), {ajax: 1}, function (data) {
m.parent('.e-content').html($(data).find('#attachment_view .e-content').html());
});
$(document).on('click','.attachment.more',function () {
var m = $(this);
m.addClass(SN.C.S.Processing);
$.get(m.attr('href'), {ajax: 1}, function (data) {
m.parent('.e-content').html($(data).find('#attachment_view .e-content').html());
});
return false;
});
return false;
}).attr('title', SN.msg('showmore_tooltip'));
}
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment