Author
Hi I'm a sixteen years old girl from Indonesia. Stalk me here.
Tutorials
All the list of tutorials, please click here. Thank you.
Credit
Tempelate by yours trully. Do not open my page source. I will respect you if you're respect me.

Jquery Back to Top // Tuesday, July 26, 2011

Assalamu'alaikum...

Lettha mau bikin tutorial pertama Lettha di blog ini nih. Namanya "Jquery Back to Top" nanti scroll to top nya keluar samar samar gitu. kalau penasaran, silakan langsung dicoba saja yah :D

Dashboard >>Design >>Edit HTML

Cari kode:
</body>

Pastekan kode ini dibawah kode tadi:
<a href='#' id='toTop'><img src='URL IMAGE TOP BUTTON?t=1292762029' style='border:0;'/></a>
Merah diganti dengan URL button back to top kamu. Lettha punya banyak koleksi, click DISINI


Cari kode:
]]></b:skin>

Pastekan kode ini diatas kode ]]></b:skin> :
/* to top */
#toTop { width:100px;background:none;border:0px solid #ccc;text-align:center;padding:5px;position:fixed;bottom:10px;right:10px;cursor:pointer;color:#666;text-decoration:none; }
Kalau icon TOP anda terpotong, silakan ubah size yang warna Biru tersebut sampai icon top anda utuh :D

Cari kode ini lagii:
</head>

Pastekan kode ini diatasnya:

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>
/*-----------------------
* jQuery Plugin: Scroll to Top
* by Letthalicious Blog (http://letthaprincess.blogspot.com/)
* Bring to you by Thata from http://lettha-story.blogspot.com/
* Copyright (c) 2011 Letthalicious Blog
* Description: Adds an unobtrusive "Scroll to Top" link to your page with smooth scrolling.
* For usage instructions and version updates to go http://letthaprincess.blogspot.com/
* Do not delete these infomation
* Version: 1.0, 12/03/2009
-----------------------*/

$(function(){$.fn.scrollToTop=function(){$(this).hide().removeAttr("href");if($(window).scrollTop()!="0"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()=="0"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:0},"slow")})}});

$(function() {
$("#toTop").scrollToTop();
});

</script>


PREVIEW DULU !!! Kalau puas, click Save Tempelate :)