From 7791d28a5d24193a01ce004988ba6767f45835ba Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 5 Jan 2015 17:10:08 +0100 Subject: Replace divgrow with more modern readmore.js --- view/js/main.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index 8c48bbb72..80518768e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -596,12 +596,10 @@ function updateConvItems(mode,data) { function collapseHeight() { $(".wall-item-body, .contact-info").each(function() { - if($(this).height() > divmore_height + 10) { - if(! $(this).hasClass('divmore')) { - $(this).divgrow({ initialHeight: divmore_height, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); - $(this).addClass('divmore'); - } - } + if(! $(this).hasClass('divmore')) { + $(this).readmore({collapsedHeight: divmore_height, moreLink: ''+aStr['divgrowmore']+'', lessLink: ''+aStr['divgrowless']+''}); + $(this).addClass('divmore'); + } }); } -- cgit v1.2.3