Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.38 veröffentlicht (30.04.24)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Scroll top and bottom
#1
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?
Mit freundlichen Grüßen



Für etwaige Tipps, Vorschläge oder Anleitungen von mir gebe ich keine Gewähr. Die Durchführung erfolgt auf eigene Gefahr!
Zitieren


Nachrichten in diesem Thema
Scroll top and bottom - von hkkp - 10.05.2015, 21:35
RE: Scroll top and bottom - von MrBrechreiz - 10.05.2015, 22:22
RE: Scroll top and bottom - von hkkp - 10.05.2015, 22:42
RE: Scroll top and bottom - von MrBrechreiz - 10.05.2015, 23:37
RE: Scroll top and bottom - von hkkp - 10.05.2015, 23:46
RE: Scroll top and bottom - von MrBrechreiz - 10.05.2015, 23:49
RE: Scroll top and bottom - von hkkp - 11.05.2015, 00:01
RE: Scroll top and bottom - von hkkp - 16.05.2015, 09:55

Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Scroll up and down Buttons Dana 0 697 29.04.2023, 15:17
Letzter Beitrag: Dana
  Jump to Bottom hkkp 17 3.290 06.06.2015, 05:51
Letzter Beitrag: MrBrechreiz
  Code-Darstellung im Beitrag ohne Scroll-Balken Rabe 11 4.233 10.08.2014, 11:02
Letzter Beitrag: MrBrechreiz
  Footer always on the bottom hkkp 5 1.689 30.03.2014, 01:46
Letzter Beitrag: MrBrechreiz
  Left Scroll bar wieder Right machen wie da3d 2 1.723 11.06.2010, 07:42
Letzter Beitrag: krafdi