This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/scripts/main.js

28 lines
1.0 KiB
JavaScript
Raw Normal View History

2019-08-16 12:05:56 +02:00
$(function () {
/* Changement du logo du header selon la largeur de la fenêtre */
function widthWindowChange() {
const windowWidth = $(window).width();
if(windowWidth < 463){
$('#logo-header').attr('src', '/img/FunctionProject_icon.png');
$('#logo-header').attr('style', 'display: inline-block;width: 80%;');
$('.navbar-brand').attr('style', 'width: 30%;');
}
else {
$('#logo-header').attr('src', '/img/FunctionProject_brand-logo.png');
$('#logo-header').removeAttr('style');
$('.navbar-brand').removeAttr('style');
}
}
$(window).resize(widthWindowChange);
widthWindowChange();
2019-10-11 21:30:05 +02:00
2019-08-18 20:06:06 +02:00
/* Permet d'afficher l'heure en temps réel sur le footer */
realDateTime('realDateTime');
2019-08-23 20:23:57 +02:00
/* Window Scroll Top Button */
2019-10-18 09:55:35 +02:00
const $btnScrollTop = $('.scroll-top-arrow');
2019-08-23 20:23:57 +02:00
$btnScrollTop.on('click', function () {
$('html, body').animate({scrollTop: 0}, 800);
return false;
});
2019-10-24 18:57:39 +02:00
});