From 2534075afe1b56396221a58a66051a3b7ae2f21d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 24 Jul 2012 23:33:42 -0700 Subject: see if this works for getting rid of scrollbars --- js/main.js | 29 ------- library/jquery.divgrow/howto | 46 +++++++++++ library/jquery.divgrow/jquery.divgrow-1.3.1.js | 89 ++++++++++++++++++++++ library/jquery.divgrow/jquery.divgrow-1.3.1.min.js | 1 + 4 files changed, 136 insertions(+), 29 deletions(-) create mode 100644 library/jquery.divgrow/howto create mode 100644 library/jquery.divgrow/jquery.divgrow-1.3.1.js create mode 100644 library/jquery.divgrow/jquery.divgrow-1.3.1.min.js diff --git a/js/main.js b/js/main.js index d86107c5b..fc24aafe2 100644 --- a/js/main.js +++ b/js/main.js @@ -708,35 +708,6 @@ jQuery.timeago.settings.strings = { numbers: tago17 }; -//$('.wall-item-content').each(function() { - -// var totalHeight = 0; -// $(this).children().each(function(){ -// totalHeight += $(this).outerHeight(true); // true = include margins -// }); -// if(totalHeight > 400) { -// $(this).css({'overflow-y':'hidden','max-height' : '400px'}); - -// } -// else { -// $(this).css('overflow-y','visible'); -// } -// }); - - -$('.wall-item-content').css({'overflow-y':'hidden','max-height' : '400px'}); - -$('.wall-item-content').focus( - function() { - $(this).css('overflow-y','visible') - }); - -$('.wall-item-content').focusout( - function() { - $(this).css( { 'overflow-y' : 'hidden','max-height' : '400px'}); - } -); - $("abbr.wall-item-ago-time").timeago(); }); \ No newline at end of file diff --git a/library/jquery.divgrow/howto b/library/jquery.divgrow/howto new file mode 100644 index 000000000..c2fdd66f9 --- /dev/null +++ b/library/jquery.divgrow/howto @@ -0,0 +1,46 @@ +1) Inlcude the JS file into your page (after jQuery): + + + + + + +2) Call the divgrow function to any div element you want to grow. initialHeight sets the height of the containers before they are expanded. + +