Fix browser prefetch in notifications menu

Fix browser prefetch by substituting data-src with src for images
This commit is contained in:
Olaf Conradi 2012-12-30 00:28:48 +01:00
parent 94c8d7693f
commit dbf8f711cf
27 changed files with 44 additions and 26 deletions

View file

@ -181,7 +181,14 @@
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
nnm.append(html);
});
$("img[data-src]", nnm).each(function(i, el){
// Replace data-src attribute with src attribute for every image
$(el).attr('src', $(el).data("src"));
$(el).removeAttr("data-src");
});
}
notif = eNotif.attr('count');
if (notif>0){
$("#nav-notifications-linkmenu").addClass("on");
@ -202,8 +209,7 @@
});
});
NavUpdate();
// Allow folks to stop the ajax page updates with the pause/break key
$(document).keydown(function(event) {