.

Blogger templates

Perfect World Online - Sword

Selasa, 06 Agustus 2013

0 2 cara memasang tombol Back Top di Blog





Sepertinya saya tidak perlu berbicara banyak,silahkan saja langsung di ikuti langkah-langkah di bawah ini gan:


Tombol Back To Top yang Pertama

  • Login terlebih dahulu ke akun Blog kalian
  • Masuk ke bagian layout / tata letak
  • Tambah gadget
  • Pilh add HTML / Java script
  • Lalu simpan kode dibawah ini :

<a href='#' style='display:scroll;position:fixed;bottom:15px;right:15px;' title='Back to Top'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij52aeHD7NE1vKsryI0dl96uFs9bFGyqZXbQhVq-F76xf4iydbQcrFDLx_caDQBRLIsmMvphIrEiIteyIqyCj4r0XzJK1yhYW-6mXNyhiRFOaOMnvfOZ-pJszr05TtDIUGbCCSWOENgRhD/s1600/navigate-up-icon.png'/></a>
Note:
  • kode yang berwarna biru ganti dengan kata-kata yang ingin ditampilkan
  • kode yang berwarna merah ganti dengan url gambar yang ingin ditampilkan

  • Klik "Save", dan selesai.



Tombol Back To Top yang kedua 


  • Pertama masuk ke Blogger lalu pilih Layout terus Add a Gadget dan tambahkan HTML/JavaScript. Terus copy kode di bawah ini:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" >


var scrolltotop={
    //startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
    //scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
    setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]},
    controlHTML: '<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvSK530vQlIZgzvJtOoYdwGzk3WR1jPQPtlpo-_CH9qrn33hylutBUwLdlovfcLq-16vVyjju5yG9hqi4qWocqXSFB3TIBbTjbsN4XNGufDSLStlFU6xN0Qe3AQRLmn4AcrQrcQI0iBkQr/s1600/back+to+top10.gif" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"
    controlattrs: {offsetx:5, offsety:5}, //offset of control relative to right/ bottom of window corner
    anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links

    state: {isvisible:false, shouldvisible:false},

    scrollup:function(){
        if (!this.cssfixedsupport) //if control is positioned using JavaScript
            this.$control.css({opacity:0}) //hide control immediately after clicking it
        var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)
        if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists
            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()!='') //loose check for IE6 and below, plus whether control contains any text
                mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text
            mainobj.togglecontrol()
            $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
                mainobj.scrollup()
                return false
            })
            $(window).bind('scroll resize', function(e){
                mainobj.togglecontrol()
            })
        })
    }
}

scrolltotop.init()

</script>

Note:
  • Ganti Kode warna merah dengan URL Gambar kalian!
  • sobat juga bisa pilih gambar dibawah ini jika mau siih:




                                                   
 https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvSK530vQlIZgzvJtOoYdwGzk3WR1jPQPtlpo-_CH9qrn33hylutBUwLdlovfcLq-16vVyjju5yG9hqi4qWocqXSFB3TIBbTjbsN4XNGufDSLStlFU6xN0Qe3AQRLmn4AcrQrcQI0iBkQr/s1600/back+to+top10.gif


                                        
 https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicAYmjEVafpbtD9fZyi_tHVEJdyfiJT17mkHCcSMQaPrJ0QdlCJP7uTpRvCtT5Pr5xAKzSBxUwAyxhgfnth95Z-MupXKvke5P8w71wSOKAudXGo6lCz7hqKbuIpmlGxkCsY5dZz2vrEYnp/s1600/back+to+top4.gif



                                              


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf7Og6h2gfM4QRgmciZ-dc-V-EQYRfeAPbE9AMLXzH02T5R3xqGxmCxv_ggyltd6cXNy6U6umkwCY2OgV3fo2mmi-9WlqDxtmsRwUbQxyiMx1QfXu6pDMjW3ZePeC9lC3X4yUaIeouWhJ7/s1600/back+to+top9.gif


                                             
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihkU8iCdplULytq9OOo54QDZ45ydMrKsvSLFeRsh5OTcbjvGIwb0LnQux1cFW-CU99lCQV5JQQUyJfEKV30ePlu8K6iUHkKo5MPbrCDwYG4rOqNPkQsM-wdGMzOrXXhHEvSnchy-BQB897/s1600/back+to+top13.png


                                            
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6BNmd3RevLIu5NhEqG_VRpRAu88ZbPSPBhnQRn6A3445_8U8aqr2dnV-BbXkOD1_GyXlyisIEd5E6_c41vWhkpVHTBP9K30OobNJ0VN5lVQe73iV5ibE_R4ja6P40_hQE6_N6PYcXuuoX/s1600/back+to+top15.png



                               
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0YuFRgY7x0WAXKJyX5SB73CA4xWnwtcd9iqcm-rpLWelveeptJgiAdGM6DFHeGaU2yeAbyTfovRJNQIsrwiVOz_aE-0UOb11StCtCirGNC85LDRzjjqyTns2lfx3-U-r3vnnQXm7xSlO5/s1600/back+to+top14.png






selamat mencoba ya gan...




Kode Smiley Untuk Komentar


:a   :b   :c   :d   :e   :f   :g   :h   :i   :j   :k   :l   :m   :n   :o   :p   :q   :r   :s   :t  

Posting Komentar

.

WELCOME TO MY BLOG

About Me

Banner Exchange

Allpen Liebe

Archive

My Blog List

Statisik Blog`

Random Games

Diberdayakan oleh Blogger.

Blog Archive

Followers

KAL-TIM (BERAU)

Popular Posts

 

run

Blogger news

Logo Design by FlamingText.com

HellO..

Blogroll

..

iklan

cara membuat banner iklan kotak 125x125 di blog