From 5e85ef39eba8c6d3d24ebba6a1d27e4c692ff67a Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 21 Jul 2013 11:31:20 +0000 Subject: [PATCH] fixed image display --- lam/templates/lib/500_lam.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lam/templates/lib/500_lam.js b/lam/templates/lib/500_lam.js index 35fcef2a..1321eced 100644 --- a/lam/templates/lib/500_lam.js +++ b/lam/templates/lib/500_lam.js @@ -115,16 +115,19 @@ function SubmitForm(id, e) { } function addResizeHandler(item, min, max) { - jQuery(item).toggle( - function(){ - jQuery(item).animate({ - height: max - }); - }, - function(){ - jQuery(item).animate({ - height: min - }); + jQuery(item).click( + function() { + if (jQuery(item).hasClass('imgExpanded')) { + jQuery(item).animate({ + height: min + }); + } + else { + jQuery(item).animate({ + height: max + }); + } + jQuery(item).toggleClass('imgExpanded'); } ); }