Button «Back to top»
3
2

Button « Back to top » 

Here is the code to put in Studio => Designer => Injections

Header (head)

<script src = "http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"> </ script> 
<style> 
.cRetour { 
  border-radius: 3px; 
  padding: 10px; 
  font-size: 15px; 
  text-align: center; 
  color: ; 
  background: rgba (0, 0, 0, 0.25); 
  z-index: 99999; 
  transition: all 0.2s ease-in; position: fixed; 
  cursor: pointer; bottom: 1em; 
  right: 20px; display: none; 
} 
.cRetour: before {content: "\ 25b2"; } 
.cRetour: hover { 
  background: rgba (0, 0, 0, 1); 
  transition: all 0.2s ease-in; 
} 
</ Style>

Body (body)

<script>             
jQuery (document) .ready (function () { 
  var duration = 500; 
  . jQuery (window) scroll (function () { 
    . if (jQuery (this) scrollTop ()> 100 ) { 
      // If one of scrollbars 100 pixels or more. 
      // Add the button 
      jQuery ( 'cRetour.'). fadeIn (duration); 
    } else { 
      // Otherwise removes the button 
      jQuery ( 'cRetour.'). fadeOut (duration); 
    } 
  }); 
				
  jQuery . ( '.cRetour') click (function (event) { 
    // clicking causes in vibrant high return. 
    event.preventDefault (); 
    jQuery ( 'html, body'). animate ({scrollTop: 0}, duration) ; 
    return false; 
  }) 
}); 
</ script> 

<div class = " cRetour "> </ div>

t6wy8dddzvcjfgh6qixpmbc8duenefrr.png

Friendships Vincent

Attachments
64