Cara membuat link back to top jquery yang simple di php custom?

Discussion in 'Desain Web dan Programming' started by Yundar Setiawan, 3 May 2015.

Thread Status:
Not open for further replies.
  1. Yundar Setiawan

    Yundar Setiawan Apprentice 2.0

    Messages:
    476
    Likes Received:
    38
    Trophy Points:
    28
    Bro sist ada yang punya referensi cara membuat link back to top jquery di php custom? yang codingannya ga ribet..hehee thank you :D
     
  2. ceo.ahlul

    ceo.ahlul Expert 1.0 Web Hosting (Company)

    Messages:
    622
    Likes Received:
    255
    Trophy Points:
    63
    Coba gunakan yang berikut:

    Code:
    <script>
    jQuery(document).ready(function(){
    jQuery('html, body').stop().animate({
        'scrollTop': jQuery("#top").offset().top
                }, 2000);
    });
    </script>
    
    Jangan lupa taruh dibagian atas element dengan ID yang ditulis pada JS nya, misal:

    <a id="top"></a>
     
    abed nego and Yundar Setiawan like this.
  3. Yundar Setiawan

    Yundar Setiawan Apprentice 2.0

    Messages:
    476
    Likes Received:
    38
    Trophy Points:
    28
    ok thnk you Tuan.. :)
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...