MyBB.de Forum

Normale Version: Scroll top and bottom
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
headerinclude:

PHP-Code:
<script type="text/javascript">
jQuery(document).ready(function(jQ){
    appear();
    
    jQ
(window).scroll(function(){
        appear();
    });
                      
    
function appear() {
        if (jQ(this).scrollTop() > 200) {
            jQ('#scroll_up').fadeIn('slow');
        } else {
            jQ('#scroll_up').fadeOut('slow');
        }
        if (jQ(this).scrollTop() < (jQ('body').height() - (200+jQ(window).height()))) {
            jQ('#scroll_dn').fadeIn('slow');
        } else {
            jQ('#scroll_dn').fadeOut('slow');
        }
    };
    
    jQ
('#scroll_up').click(function(){
        jQ('body').stop().animate({scrollTop0}, 600);
    });
    jQ('#scroll_dn').click(function(){
        jQ('body').stop().animate({scrollTopjQ('body').height()}, 600);
    });
});
</
script

global.css:

Code:
#scroll_up, #scroll_dn {
  position: fixed;
  right: 5px;
  width: 35px;
  height: 35px;
  cursor: pointer;
  display: none;
  z-index: 999;
  background:  #026CB1 url(../../../images/sc_arrow.png) center no-repeat;
}
#scroll_up {
    bottom: 50px;
}
#scroll_dn {
    bottom: 10px;
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transform: rotate(180deg);
}

footer:

PHP-Code:
<span id='scroll_up'></span><span id='scroll_dn'></span


es wird alles angezeigt, aber wieso hüpft der nicht nach oben oder unten?
mmmhhh, wenn ich es denn mal sehen würde...
Da ist ein Button, der nennt sich DEMO ^^
hat sich erledigt...
In wie fern ?
nur mit dem link in der mitte will nicht so... weil wenn ich dann auf die mitte klicke, dann will er mich zu true weiterleiten...
(10.05.2015, 22:22)MrBrechreiz schrieb: [ -> ]Nimm lieber dies

http://www.jqueryscript.net/other/jQuery...ToTop.html

hab das genommen. funktionier sehr gut. danke!