Headlines News :
Home » » Making Back Button to Move Up like this blog

Making Back Button to Move Up like this blog

Written By Unknown on Friday 18 October 2013 | 18:54

This time I want to share a tutorial how to build your Back Button to Move Up as this blog. For my friends who are interested please just how to make it:

 
  • Log into your blog and login with your id
  • select the widget HTML code
  • and enter the following code in it:
<!--Back to top script by dynamicdrive.com and tiloejungle.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)
    * Advanced modification by buka-rahasia.blogspot.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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3U15Se0Sdnyo4uF82SLIP2GrfKRkd3FaJ8EdDrnTq3me3Hrl-f7HoayuowjKAZSInv_Ys3X3682rovLueqw2a80St_VtyCcviZ-_zw0p0-T_ER5wymyEWTboBVlop9VHs8b6GeinQqO0/s1600/hb-arrow-up.png" />',
        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, left: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 and tiloejungle.blogspot.com end-->
  • ENDS

May be useful. Greetings, greetings!

I just ordinary blogger who love to learn and share knowledge and experience with others. Thanks a lot to the blog Indonesian-Herbal, this blog may also be useful for people in need. Please enter your email in the box below to get updates from this blog article. Greetings!.


Your information will not be shared. Ever.
Share this post :
 
Special Thanks To : Obat Indonesia | Johny Template | Mas Template
Copyright © 2013. T11U (Tiloe Jungle) Medicinal Herbal! - All Rights Reserved
Template modif by Jasa Website Pangkalpinang Published by T11U
Proudly powered by Blogger
Join us on Facebook Follow us on Twitter Add us on G+ Subscribe to RSS