| Current Path : /home/h/a/p/happyrenas/old/devis-huissier.fr/old/components/js/ |
Linux webd005.cluster105.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 |
| Current File : /home/h/a/p/happyrenas/old/devis-huissier.fr/old/components/js/functions.js |
(function ($) {
$(function() {
$(document).ready(function () {
// to top right away
if (window.location.hash) scroll(0, 0);
// void some browsers issue
setTimeout(function() {
scroll(0, 0);
}, 1);
// any position
$(function() {
// your current click function
$('.scroll').on('click', function(e) {
e.preventDefault();
$('html, body').animate({
scrollTop: $($(this).attr('href')).offset().top + 'px'
}, 1000, 'swing');
});
// *only* if we have anchor on the url
if (window.location.hash) {
// smooth scroll to the anchor id
$('html, body').animate({
scrollTop: $(window.location.hash).offset().top + 'px'
}, 1000, 'swing');
}
});
$('#bt-menu').on('click', function (event) {
$('#bt-menu').closest('header').toggleClass("ouvert");
$('#bt-menu').closest('html').toggleClass("noscroll");
});
$('.head-border').on('click', function (event) {
$(this).closest('.border').toggleClass("ouvert");
});
$('#head-dep').on('click', function (event) {
$(this).closest('ul').toggleClass("ouvert");
});
});
});
})(jQuery);