Arrow footer animation
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
|         <footer class="text-center"> | ||||
|             <a href="#" class="important"><i class="fas fa-arrow-up"></i></a> | ||||
|             <a href="#" class="scroll-top important"><i class="fas fa-arrow-up"></i></a> | ||||
|             <div class="realDateTime">Affichage de l'heure en temps réel : <span class="important" id="realDateTime"></span></div> | ||||
|             <div class="footer-text"><a href="https://divlo.fr/" target="_blank">Divlo</a> | Tous droits réservés</div> | ||||
|         </footer> | ||||
|   | ||||
| @@ -123,6 +123,21 @@ $(function () { | ||||
|     /* Permet d'afficher l'heure en temps réel sur le footer */ | ||||
|     window.onload = realDateTime('realDateTime'); | ||||
|  | ||||
|     /* Window Scroll Top Button */ | ||||
|     var $btnScrollTop = $('.scroll-top'); | ||||
|     $(window).scroll(function () { | ||||
|         if ($(this).scrollTop() > 100) { | ||||
|             $btnScrollTop.fadeIn(); | ||||
|         } else { | ||||
|             $btnScrollTop.fadeOut(); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     $btnScrollTop.on('click', function () { | ||||
|         $('html, body').animate({scrollTop: 0}, 800); | ||||
|         return false; | ||||
|     }); | ||||
|  | ||||
|     // Fin de l'import des fonctions | ||||
|     }); | ||||
|     // Fin de l'import des variables | ||||
|   | ||||
		Reference in New Issue
	
	Block a user