aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-24 23:33:42 -0700
committerfriendica <info@friendica.com>2012-07-24 23:33:42 -0700
commit2534075afe1b56396221a58a66051a3b7ae2f21d (patch)
tree913a91f13774fe6391ef285cfc6c958ddc4f059a /library
parent6911beca2f1d88a9e26c1dc110b2547a1b075951 (diff)
downloadvolse-hubzilla-2534075afe1b56396221a58a66051a3b7ae2f21d.tar.gz
volse-hubzilla-2534075afe1b56396221a58a66051a3b7ae2f21d.tar.bz2
volse-hubzilla-2534075afe1b56396221a58a66051a3b7ae2f21d.zip
see if this works for getting rid of scrollbars
Diffstat (limited to 'library')
-rw-r--r--library/jquery.divgrow/howto46
-rw-r--r--library/jquery.divgrow/jquery.divgrow-1.3.1.js89
-rw-r--r--library/jquery.divgrow/jquery.divgrow-1.3.1.min.js1
3 files changed, 136 insertions, 0 deletions
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):
+
+<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
+
+<script src="JS/jquery.divgrow.js" type="text/javascript"></script>
+
+
+2) Call the divgrow function to any div element you want to grow. initialHeight sets the height of the containers before they are expanded.
+
+<script type="text/javascript">
+ $().ready(function() {
+ $('div.more-block').divgrow({ initialHeight: 147 });
+ });
+
+
+3) Create you container and give it a reference, i.e. by classname "more-block"
+
+ <div class="more-block">
+ <h2>Corns and Callus (Hyperkeratosis)</h2>
+ <p>
+ These occur in areas of the foot that are experiencing excess pressure and/or friction. The body seeks to defend itself by producing extra layers of skin as a form of protection. However as the process continues the accumulation of extra skin exceeds that which is lost naturally so the skin in these vulnerable areas builds up and becomes compacted as the original cause of the process continues. The protective mechanism becomes the problem if left untreated and the cause not addressed.<br />
+ Callus denotes a general area of hard dead skin and a corn is a much more concentrated collection which often goes deep rather than wide. Corns can produce pain completely out of proportion to their size often because of impingement upon nerves or sometimes infection.<br />
+ Treatment of the symptoms is the first step to stopping the pain and discomfort and this is usually addressed without much discomfort by a foot health professional. Treating the cause can be as simple as discarding an ill fitting pair of shoes or may entail a more detailed assessment of individual foot function.<br />
+ Callus is not always caused by mechanical factors but can be a symptom of a systemic disease such as Psoriasis.<br />
+ There are some useful devices to assist in protecting vulnerable areas from corns and callus ? see our recommended <a href="Products.aspx">products page</a>.
+ </p>
+ </div>
+
+
+
+-----------------------------------------------------
+
+Thats it.
+
+Optional arguments:
+
+initialHeight: 100 - (default)
+moreText: "+ Show More" - (default)
+lessText: "- Show Less" - (default)
+showBrackets: true - (default)
+
+e.g.
+
+$('div.more-block').divgrow({ initialHeight: 147, moreText: "give me more", lessText: "thats enough", showBrackets: false });
+
+
diff --git a/library/jquery.divgrow/jquery.divgrow-1.3.1.js b/library/jquery.divgrow/jquery.divgrow-1.3.1.js
new file mode 100644
index 000000000..811d2ca3e
--- /dev/null
+++ b/library/jquery.divgrow/jquery.divgrow-1.3.1.js
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2010 Simon Hibbard
+*
+* Permission is hereby granted, free of charge, to any person
+* obtaining a copy of this software and associated documentation
+* files (the "Software"), to deal in the Software without
+* restriction, including without limitation the rights to use,
+* copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following
+* conditions:
+
+* The above copyright notice and this permission notice shall be
+* included in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/*
+* Version: V1.3.1
+* Release: 22-12-2010
+* Based on jQuery 1.4.2
+*/
+
+(function ($) {
+ var divgrowid = 0;
+ $.fn.divgrow = function (options) {
+ var options = $.extend({}, { initialHeight: 100, moreText: "+ Show More", lessText: "- Show Less", speed: 1000, showBrackets: true }, options);
+
+ return this.each(function () {
+ divgrowid++;
+
+ obj = $(this);
+
+ var fullHeight = obj.height() + 10;
+
+ obj.css('height', options.initialHeight).css('overflow', 'hidden');
+ if (options.showBrackets) {
+ obj.after('<p class="divgrow-brackets">[&hellip;]</p><a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>');
+ }
+ else {
+ obj.after('<a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>');
+ }
+ $("a.divgrow-showmore").html(options.moreText);
+
+ $("." + "divgrow-obj-" + divgrowid).toggle(function () {
+ //alert(obj.attr('class'));
+ // Set the height from the elements rel value
+ //var height = $(this).prevAll("div:first").attr('rel');
+
+ $(this).prevAll("div:first").animate({ height: fullHeight + "px" }, options.speed, function () { // Animation complete.
+
+ // Hide the overlay text when expanded, change the link text
+ if (options.showBrackets) {
+ $(this).nextAll("p.divgrow-brackets:first").fadeOut();
+ }
+ $(this).nextAll("a.divgrow-showmore:first").html(options.lessText);
+
+ });
+
+
+ }, function () {
+
+ $(this).prevAll("div:first").stop(true, false).animate({ height: options.initialHeight }, options.speed, function () { // Animation complete.
+
+ // show the overlay text while closed, change the link text
+ if (options.showBrackets) {
+ $(this).nextAll("p.divgrow-brackets:first").stop(true, false).fadeIn();
+ }
+ $(this).nextAll("a.divgrow-showmore:first").stop(true, false).html(options.moreText);
+
+ });
+ });
+
+ });
+ };
+})(jQuery);
+
+
+
+
+
diff --git a/library/jquery.divgrow/jquery.divgrow-1.3.1.min.js b/library/jquery.divgrow/jquery.divgrow-1.3.1.min.js
new file mode 100644
index 000000000..fd08f7fa8
--- /dev/null
+++ b/library/jquery.divgrow/jquery.divgrow-1.3.1.min.js
@@ -0,0 +1 @@
+(function ($) { var divgrowid = 0; $.fn.divgrow = function (options) { var options = $.extend({}, { initialHeight: 100, moreText: "+ Show More", lessText: "- Show Less", speed: 1000, showBrackets: true }, options); return this.each(function () { divgrowid++; obj = $(this); var fullHeight = obj.height() + 10; obj.css('height', options.initialHeight).css('overflow', 'hidden'); if (options.showBrackets) { obj.after('<p class="divgrow-brackets">[&hellip;]</p><a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>') } else { obj.after('<a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>') } $("a.divgrow-showmore").html(options.moreText); $("." + "divgrow-obj-" + divgrowid).toggle(function () { $(this).prevAll("div:first").animate({ height: fullHeight + "px" }, options.speed, function () { if (options.showBrackets) { $(this).nextAll("p.divgrow-brackets:first").fadeOut() } $(this).nextAll("a.divgrow-showmore:first").html(options.lessText) }) }, function () { $(this).prevAll("div:first").stop(true, false).animate({ height: options.initialHeight }, options.speed, function () { if (options.showBrackets) { $(this).nextAll("p.divgrow-brackets:first").stop(true, false).fadeIn() } $(this).nextAll("a.divgrow-showmore:first").stop(true, false).html(options.moreText) }) }) }) } })(jQuery); \ No newline at end of file