]> git.mxchange.org Git - friendica.git/blob - view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.min.js
9232430574c7dc3e8e9c2c5216e318c7365d0f49
[friendica.git] / view / theme / frost-mobile / js / jquery.divgrow-1.3.1.f1.min.js
1 /*
2 * Copyright (c) 2010 Simon Hibbard
3
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use,
8 * copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following
11 * conditions:
12
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
15
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE. 
24 *//*
25 * Version: V1.3.1-f1
26 * Release: 22-12-2010
27 * Based on jQuery 1.4.2
28 *
29 * 2012-10-29: Modified by Zach Prezkuta to allow dynamic full heights
30 */(function(e){var t=0;e.fn.divgrow=function(n){var n=e.extend({},{initialHeight:100,moreText:"+ Show More",lessText:"- Show Less",speed:1e3,showBrackets:!0},n);return this.each(function(){t++,obj=e(this),obj.css("height",n.initialHeight).css("overflow","hidden"),n.showBrackets?obj.after('<p class="divgrow-brackets">[&hellip;]</p><a href="#" class="divgrow-showmore divgrow-obj-'+t+'"'+"></a>"):obj.after('<a href="#" class="divgrow-showmore divgrow-obj-'+t+'"'+"></a>"),e("a.divgrow-showmore").html(n.moreText),e(".divgrow-obj-"+t).toggle(function(){var t=e(this).prevAll("div:first")[0].scrollHeight+10;e(this).prevAll("div:first").animate({height:t+"px"},n.speed,function(){n.showBrackets&&e(this).nextAll("p.divgrow-brackets:first").fadeOut(),e(this).nextAll("a.divgrow-showmore:first").html(n.lessText)})},function(){e(this).prevAll("div:first").stop(!0,!1).animate({height:n.initialHeight},n.speed,function(){n.showBrackets&&e(this).nextAll("p.divgrow-brackets:first").stop(!0,!1).fadeIn(),e(this).nextAll("a.divgrow-showmore:first").stop(!0,!1).html(n.moreText)})})})}})(jQuery);