Tombol turun dan naik



Demo :

Lihat dipojok kanan anda , letakkan kursor mouse anda diatasnya !.





Cara membuatnya

Dari Dashboard >> Design >> Edit HTML.


Penempatan kode HTML dan JavaScript
tepat disamping sebelum </body>

<div id="staticbuttons" style="position:absolute;">
<a href="javascript:" onmouseover="myspeed=-thespeed" onmouseout="myspeed=0"><img
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKXnJkGcgDwosV6PbFN_CLrFeMm_9bSLQQtG4_dRXQ92UzEr44btkQlMljsT1v2NNVOhzMRgPljAGVaxmRv4Dvbq9kKux8YMpgJPdIVoJAQGvBn5723ed3CDVIdLps_pQBnG4C5t7Lu0Ax/s400/Nano+Yulianto-up.png" border="0" /></a><br />
<a href="javascript:" onmouseover="myspeed=thespeed" onmouseout="myspeed=0"><img
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUNmVSLCPsz8mpZbdJy7vJ9RFCOxQYCaGJhQwd-lNmziH15bA_hqIxJxDfwRLT1K_WCcemWCgJeJ4PWtUxRCKcPeddpkxYo2Bw71Ukqr7muhbVvSFE4zQn-i5ohVDoBpnhEGjU_CRWzV3Y/s400/Nano+Yulianto-down.png" border="0" /></a>
</div>

<script type='text/javascript'>
//<![CDATA[

//Script Tombol turun dan naik By Dynamic Drive
// (www.dynamicdrive.com/dynamicindex2/pagescroller.htm)
//This credit MUST stay intact for use

var Hoffset=60
var Voffset=60
var thespeed=3 //Kecepatan

var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
var myspeed=0

var ieHoffset_extra=document.all? 15 : 0
var cross_obj=document.all? document.all.staticbuttons : document.getElementById? document.getElementById("staticbuttons") : document.staticbuttons

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function positionit(){
var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra
var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight

if (document.all||document.getElementById){
cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+"px"
}
else if (document.layers){
cross_obj.left=dsocleft+window_width-Hoffset
cross_obj.top=dsoctop+window_height-Voffset
}
}

function scrollwindow(){
window.scrollBy(0,myspeed)
}

function initializeIT(){
positionit()
if (myspeed!=0){
scrollwindow()
}
}

if (document.all||document.getElementById||document.layers)
setInterval("initializeIT()",20)

//]]>
</script>



Credit : Dynamic Drive

Alhamdulillah

3 comments:


  1. thanks broo...

  2. makasih om sangat bermanfaaat :D

  3. Makasih untuk Sharenya. Semoga tambah sukses

Posting Komentar


Creative Commons License
Tombol turun dan naik by Nano Yulianto is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at http://nanoyulianto.blogspot.com/2011/03/tombol-turun-dan-naik.html.
Permissions beyond the scope of this license may be available at http://nanoyulianto.blogspot.com/.