From 1d459af0464eb2cdbdaaaf1122e1681210fdffea Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Fri, 14 Jun 2013 20:45:00 +0200 Subject: Fix issue #75 : chargement des images en lazyload, reste à le rendre optionnel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/javascript/main.phtml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views/javascript/main.phtml') diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index e6c882333..443f62c31 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -109,8 +109,8 @@ function mark_favorite (active) { } function init_img () { - $(".flux .content img").each (function () { - if ($(this).width () > ($("#stream .content").width()) / 2) { + $(".flux_content .content img").each (function () { + if ($(this).width () > ($(".flux_content .content").width()) / 2) { $(this).addClass("big"); } }); @@ -125,6 +125,8 @@ function init_posts () { init_img (); + // TODO rendre optionnel + $(".flux .content img").lazyload(); if (hide_posts) { $(".flux:not(.active) .flux_content").hide (); -- cgit v1.2.3