Replace divgrow with more modern readmore.js

This commit is contained in:
Stefan Parviainen
2015-01-05 17:10:08 +01:00
parent 074be42e23
commit 7791d28a5d
4 changed files with 495 additions and 7 deletions

View File

@@ -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: '<a href="#">'+aStr['divgrowmore']+'</a>', lessLink: '<a href="#">'+aStr['divgrowless']+'</a>'});
$(this).addClass('divmore');
}
});
}