diff options
author | friendica <info@friendica.com> | 2012-04-24 17:55:56 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-04-24 17:55:56 -0700 |
commit | 139c2c1bbdffeb8df07004a9fdf919adf0bac72c (patch) | |
tree | 19f6b5a3a489a7c3a39b338e2c8c77cd88db7bec /view/theme/diabook/theme.php | |
parent | a5f9e67c9f17d65c9958ba55c3aa5d2f0b9d52fa (diff) | |
parent | 75828b4750dbed8d8c0515ab8bfa1b2276b7f65f (diff) | |
download | volse-hubzilla-139c2c1bbdffeb8df07004a9fdf919adf0bac72c.tar.gz volse-hubzilla-139c2c1bbdffeb8df07004a9fdf919adf0bac72c.tar.bz2 volse-hubzilla-139c2c1bbdffeb8df07004a9fdf919adf0bac72c.zip |
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'view/theme/diabook/theme.php')
-rwxr-xr-x | view/theme/diabook/theme.php | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 269015d0a..073e270ef 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -356,25 +356,48 @@ $(document).ready(function() { $(this).attr("src",newString+"?"+wmode+"&"+oldString); } else $(this).attr("src",ifr_source+"?"+wmode); + }); - - $("a[href=#top]").click(function() { - $("html, body").animate({scrollTop:0}, "slow"); - return false; - }); - }); function yt_iframe() { - $("iframe").load(function() { var ifr_src = $(this).contents().find("body iframe").attr("src"); $("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent"); }); }; + +function scrolldown(){ + $("html, body").animate({scrollTop:$(document).height()}, "slow"); + return false; + }; + +function scrolltop(){ + $("html, body").animate({scrollTop:0}, "slow"); + return false; + }; + +$(window).scroll(function () { + + + var scrollInfo = $(window).scrollTop(); + + if (scrollInfo <= "900"){ + $("a#top").attr("id","down"); + $("a#down").attr("onclick","scrolldown()"); + $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_bottom.png"); + } + + if (scrollInfo > "900"){ + $("a#down").attr("id","top"); + $("a#top").attr("onclick","scrolltop()"); + $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_top.png"); + } + + }); </script>'; |