Tutorial #7: Back to Top Button Jquery (stereo up!)

Assalamualaikum! Yeayyy hari ini nak buat tutorial! Heee heee heee. Tutorial macam mana nak buat back to top dengan cara yang elegan -.- I mean, yang macam aku punya ni lah. Yang STEREOUP! dekat bawah belah kanan niii. TEEHEE!

Here we go!

1. Go to DESIGN >  Edit HTML

2. Search this code using CTRL+F;
</body>
3. Copy code yang tertera di bawah ni;
<a href='#' id='toTop'><img src='URL IMAGE TOP BUTTON?t=1292762029' style='border:0;'/></a>
dan paste sebelum </body>

4. After that, CTRL+F and search this;
]]></b:skin>
5. Copy this code;
/* 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; }
paste sebelum ]]></b:skin>

6. Then, search for this code;
</head>
7. Copy this code;
<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 Craig Wilson, Ph.Creative (http://www.ph-creative.com) * Bring to you by Zen from http://zenplate.blogspot.com * Copyright (c) 2009 Ph.Creative Ltd. * Description: Adds an unobtrusive "Scroll to Top" link to your page with smooth scrolling. * For usage instructions and version updates to go http://blog.ph-creative.com/post/jquery-plugin-scroll-to-top.aspx * 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>
and paste sebelum </head>

8. SAVE!

Buttons made by me.
Nak ambik je ;D
CTRL+C

Photobucket
http://i532.photobucket.com/albums/ee324/gurlofpink/btt6-1.png
Photobucket
http://i532.photobucket.com/albums/ee324/gurlofpink/btt5-1.png
Photobucket
http://i532.photobucket.com/albums/ee324/gurlofpink/btt4-1.png
Photobucket
http://i532.photobucket.com/albums/ee324/gurlofpink/btt1-1.png
Photobucket
http://i532.photobucket.com/albums/ee324/gurlofpink/btt7-1.png
Photobucket
http://i532.photobucket.com/albums/ee324/gurlofpink/btt3-1.png
Photobucket
http://i532.photobucket.com/albums/ee324/gurlofpink/btt2-1.png

Tips: Kalau korang nak buat sendiri button pun boleh, pastikan background TRANSPARENT, dan width 100px. Kalau nak width tu lagi besar, adjust width dekat STEP 5.
Credits: Mai | NNK
HAPPY!

Comments

  1. Ehek nama saya ada kat situ larhh. lol. hujan lebat: tanda2 akhir zaman. betul ke?! :S

    ReplyDelete
  2. 1) gerhana: kiamat?! Kenapa eh, Ustazah Fifiey? :P
    2) ececeh main play hard to get pulak dengan blonde XD woi. you're bloody right. boleh buat duit ohh dengan mimpi2 ni!!!
    3) LOLOLOLOL DIARY OF A BORING KID XD Badan saya= forever batang T^T

    ReplyDelete
  3. Ayah saya cakap gerhana takde kene mengena pun dgn kiamat? --" Takpelah, tunggu je lah abang awak tu.

    ReplyDelete
  4. eih , tenkiu tutorial letak button to top ek . jadi la !
    saya amek sebijik tau (:

    tenkiu sekali lagi .

    ReplyDelete

Post a Comment

Popular posts from this blog

Snow White & The Huntsman

Beraya di rumah Zizan Raja Lawak! LOL xDD

Kawaii Photo Contest .

Followers