How to Make a stylish button Bounce Back to Top

Actually I have a lot of tutorials to make it back to top button, but there is no question of this blog visitors about how to make the switch back to the top with a bounce effect.

Before stepping on the tutorial, I wish to thank the visitors of this blog, as with many questions raised the idea to create a new article.

Further to the tutorial ... What is the effect of bounce it? bounce means bouncing, so back to top after discroll there will be little effect of reflection. To apply, please follow the easy steps:
How to Make a stylish button Bounce Back to Top

Step 1: Save the jQuery code above </ head>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>

skip this step if you are already on your blog. Versions can vary such as 1.3.2, 1.6.4, 1.7.1, etc.

Step 2: Save the code is still above </ head>


<script type='text/javascript'>
$(function() { $(window).scroll(function() { if($(this).scrollTop()>100) { $('#BounceToTop').fadeIn(); } else { $('#BounceToTop').fadeOut(); } });
$('#BounceToTop').click(function() { $('body,html').animate({scrollTop:0},800) .animate({scrollTop:25},200) .animate({scrollTop:0},150) .animate({scrollTop:10},100) .animate({scrollTop:0},50); }); });
</script>

Step 3: Create a new widget HTML / JavaScript, save this code:


<style type='text/css' scoped='scoped'>
#BounceToTop{position:fixed; bottom:0px; right:3px; cursor:pointer;display:none}
</style>
<div id='BounceToTop'><img alt='Back to top' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2pJfql0ADB63Zv0pRAMw8jLRjrktAAykePK1W5xQSvk0ohDTrs2vEaEEjymHhLRPLzARwfnsiXt3LDNj_xeQcOGxGyOlYOv0lezvIxH1NT7ncFNsXwxo_5gAA5a9OgcMKuLBCxCvHATT_/s1600/arrow-up_basic_blue.png'/></div>

Display button with the code above using the fade in / fade out (emerged slowly), when the button want to emerge from the bottom like this blog, replace the code in step 2 with this code:
<script type='text/javascript'>
$(function() { $(window).scroll(function() { if($(this).scrollTop()>100) { $('#BounceToTop').slideDown(200); } else { $('#BounceToTop').slideUp(300); } });
$('#BounceToTop').click(function() { $('body,html').animate({scrollTop:0},800) .animate({scrollTop:25},200) .animate({scrollTop:0},150) .animate({scrollTop:10},100) .animate({scrollTop:0},50); }); });
</script>
Done !
Thanks for coming

The easiest way to Make sticky widget on the blog

Sticky widget This function would make the visitor becomes easier to see Sidebar Widget that you use on your blog, and Sticky Widget does not create a blog so heavy or no effect on the weight of your blog, so do not hesitate to use this Sticky Widget.
  • Sign in to your Blogger Dashboard
  • Click Template »Edit HTML
  • Find the code]]> </ b: skin> (to speed up the search press Ctrl + F)
  • Enter the following code above / before the code]]> </ b: skin>

     <!--sticky-->
    #mdstickybar {background-color:#ECEEF5;padding-top:10px;width:300px!important;padding-bottom:15px;
    color:#474747;}
    <!--sticky-->

Then look for the code </ head> and enter the following code above / before </ head>

<!--sticky--> <script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'/> <script type='text/javascript'> /*<![CDATA[*/ // Sticky Plugin // ============= // Author: Lintas Weblog // Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) // Created: 2/14/2011 // Date: 9/12/2011 // Website: http://labs.anthonygarand.com/sticky // Description: Makes an element on the page stick on the screen as you scroll // For Blogger by : http://lintasweblog.blogspot.com/ (function($) { var defaults = { topSpacing: 0, bottomSpacing: 0, className: 'is-sticky', center: false }, $window = $(window), $document = $(document), sticked = [], windowHeight = $window.height(), scroller = function() { var scrollTop = $window.scrollTop(), documentHeight = $document.height(), dwh = documentHeight - windowHeight, extra = (scrollTop > dwh) ? dwh - scrollTop : 0; for (var i = 0; i < sticked.length; i++) { var s = sticked[i], elementTop = s.stickyWrapper.offset().top, etse = elementTop - s.topSpacing - extra; if (scrollTop <= etse) { if (s.currentTop !== null) { s.stickyElement.css('position', '').css('top', '').removeClass(s.className); s.currentTop = null; } } else { var newTop = documentHeight - s.elementHeight - s.topSpacing - s.bottomSpacing - scrollTop - extra; if (newTop < 0) { newTop = newTop + s.topSpacing; } else { newTop = s.topSpacing; } if (s.currentTop != newTop) { s.stickyElement.css('position', 'fixed').css('top', newTop).addClass(s.className); s.currentTop = newTop; } } } }, resizer = function() { windowHeight = $window.height(); }; // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer): if (window.addEventListener) { window.addEventListener('scroll', scroller, false); window.addEventListener('resize', resizer, false); } else if (window.attachEvent) { window.attachEvent('onscroll', scroller); window.attachEvent('onresize', resizer); } $.fn.sticky = function(options) { var o = $.extend(defaults, options); return this.each(function() { var stickyElement = $(this); if (o.center) var centerElement = "margin-left:auto;margin-right:auto;"; stickyId = stickyElement.attr('id'); stickyElement .wrapAll('<div id="' + stickyId + 'StickyWrapper" style="' + centerElement + '"></div>') .css('width', stickyElement.width()); var elementHeight = stickyElement.outerHeight(), stickyWrapper = stickyElement.parent(); stickyWrapper .css('width', stickyElement.outerWidth()) .css('height', elementHeight) .css('clear', stickyElement.css('clear')); sticked.push({ topSpacing: o.topSpacing, bottomSpacing: o.bottomSpacing, stickyElement: stickyElement, currentTop: null, stickyWrapper: stickyWrapper, elementHeight: elementHeight, className: o.className }); }); }; })(jQuery); /*]]>*/ </script> <!--sticky-->

Next find </ body> then Enter the following code above / before </ body>

     <script type='text/javascript'>
    $(document).ready(function(){
    $(&quot;#mdstickybar&quot;).sticky({topSpacing:0});
    });
    </script>

Now save your template .

After that we have to look for ID Widget will we post Sticky widgets, how to search for an ID Widget Simply by going to the Layout »Then search widget will you post Sticky» then click Edit on the Widget, ID Widget buddy will be listed on Url Widget , examples Url Widget:
http://www.blogger.com/rearrange?blogID=1787216510986734973&action=editWidget&sectionId=sidebar-bawah&widgetType=null&widgetId=HTML2

Againt go to edit your template ( edit html ) and then Then look for your Widget ID that was wanted by Sticky WidgetSample ID Widget that of the Template

<b:widget id='HTML2' locked='false' title='Contact' type='HTML'> <b:includable id='main'> <!-- only display title if it's non-empty --> <b:if cond='data:title != &quot;&quot;'> <h2 class='title'><data:title/></h2> </b:if> <div class='widget-content'> <data:content/> </div> <b:include name='quickedit'/> </b:includable> </b:widget>

Above is a native widget code in the default template, may usually differ slightly, but how to create a Sticky Widget will always work :P

then add this code between the code <div id = 'mdstickybar'>
So the result will be like this


<b:widget id='HTML2' locked='false' title='Contact' type='HTML'> <b:includable id='main'> <div id='mdstickybar'> <!-- only display title if it's non-empty --> <b:if cond='data:title != &quot;&quot;'> <h2 class='title'><data:title/></h2> </b:if> <div class='widget-content'> <data:content/> </div> </div> <b:include name='quickedit'/> </b:includable> </b:widget>

Next save template

its all !! thanks for coming !