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


Status
Not open for further replies.

Yundar Setiawan

Expert 1.0
Bro sist ada yang punya referensi cara membuat link back to top jquery di php custom? yang codingannya ga ribet..hehee thank you :D
 

ceo.ahlul

Expert 1.0
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>
 
Status
Not open for further replies.

Top