Oke bro, gw lanjutin ngeposting lagi di blog gw yang unyu-unyu ini , dikarenakan gw lagi ngejar Setoran =)) Sekarang Bulan November bro, Target Tahun 2014 pas Google Update Page Rank, gw Musti dapetin PageRank Minimal Pagerank 2, Doain blog gw ini yak bro . wkwkwk (Jadi CurcoL)
Oke bro, gw jelasin, ini adalah Back To TOP Dengan JQuery bro, tampilannya elegant, Dan waktu di klik dia ga lgsung balik ke atas, tapi perlahan-lahan bro , pada ngerti maksudnya kan ? oke gw lanjutin, yang kita butuhin cuma keyboard aja wehehehe emang bener kan ? yang dibutuhin cuma keyboard, kalo g ada keyboard ga bisa Copas Code gw ...
 |
Back To Top Dengan JQuery - Back To Top Widget With JQuery |
First, Go To DASHBOARD Blog
Next Step, kita pergi ke tab Layout
Yang ketiga, add Widget bro, terus pilih Text HTML
Next Kita masukin Script ini bro
<!--Back to top script by dynamicdrive.com and buka-rahasia.blogspot.com-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" >
<!-- hapus script di atas jika template sudah menggunakan jquery-->
/***********************************************
* Scroll To Top Control script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Project Page at http://www.dynamicdrive.com for full source code
***********************************************/
var scrolltotop={
setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 200]},
controlHTML: '<img src="URL Gambar Back To Top" />',
controlattrs: {offsetx:5, offsety:5},
anchorkeyword: '#top',
state: {isvisible:false, shouldvisible:false},
scrollup:function(){
if (!this.cssfixedsupport)
this.$control.css({opacity:0})
var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)
if (typeof dest=="string" && jQuery('#'+dest).length==1)
dest=jQuery('#'+dest).offset().top
else
dest=0
this.$body.animate({scrollTop: dest}, this.setting.scrollduration);
},
keepfixed:function(){
var $window=jQuery(window)
var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx
var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety
this.$control.css({left:controlx+'px', top:controly+'px'})
},
togglecontrol:function(){
var scrolltop=jQuery(window).scrollTop()
if (!this.cssfixedsupport)
this.keepfixed()
this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false
if (this.state.shouldvisible && !this.state.isvisible){
this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])
this.state.isvisible=true
}
else if (this.state.shouldvisible==false && this.state.isvisible){
this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])
this.state.isvisible=false
}
},
init:function(){
jQuery(document).ready(function($){
var mainobj=scrolltotop
var iebrws=document.all
mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')
mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')
.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})
.attr({title:'Scroll Back to Top'})
.click(function(){mainobj.scrollup(); return false})
.appendTo('body')
if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //khusus versi IE6 ke bawah untuk loose check, juga untuk melihat apakah control mengandung teks
mainobj.$control.css({width:mainobj.$control.width()}) //IE6- perlu diset witdh yang jelas agar kontainer text terbentuk dengan rapi
mainobj.togglecontrol()
$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
mainobj.scrollup()
return false
})
$(window).bind('scroll resize', function(e){
mainobj.togglecontrol()
})
})
}
}
scrolltotop.init()
</script>
<!--Back to top script by dynamicdrive.com-->
Oke bro, Copas code tersebut, dan Jangan Lupa edit Bagian "
URL Gambar Back To Top" dengan URL Button back To TOP Pilihan kita bro, terserah kita mau bikin sendiri atau gimana, tapi yang pasti disini gw udah sedia-in URL Button nya bro, Silahkan di Copy Image URL nya
Posted by: ozy localhost
Ozy L0caLHosT | PersonaL BLog
Updated at :
22.15
Hi, I am the author of Ozy L0caLHost | PersonaL BLog. I am an Interpreter and English Lecturer of a college in Jember, Indonesia as well as a part-time blogger. More
About Me