|
Server IP : 10.111.40.2 / Your IP : 216.73.217.145 Web Server : Apache System : Linux webd002.cluster111.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : comimage ( 586) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/comimage/agencecomimage.com/js/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
$(document).ready(function() {
$.fn.firstWord = function() {
var text = this.text().trim().split(" ");
var first = text.shift();
this.html((text.length > 0 ? "<span>" + first + "</span> " : first) + text.join(" "));
};
$("h1").firstWord();
new WOW().init();
if (jQuery(window).width() > 1152) {
jQuery(window).scroll(function() {
//Au scroll dans la fenetre on déclenche la fonction
if (jQuery(this).scrollTop() > 140) {
//si on a défilé de plus de 150px du haut vers le bas
jQuery('.header').addClass("header-fixe"); //on ajoute la classe "fixNavigation" à <div id="navigation">
} else {
jQuery('.header').removeClass("header-fixe"); //sinon on retire la classe "fixNavigation" à <div id="navigation">
}
});
}
// Select all links with hashes
$('a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &&
location.hostname == this.hostname
) {
// Figure out element to scroll to
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
$('html, body').animate({
scrollTop: target.offset().top
}, 1000, function() {
// Callback after animation
// Must change focus!
var $target = $(target);
$target.focus();
if ($target.is(":focus")) { // Checking if the target was focused
return false;
} else {
$target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable
$target.focus(); // Set focus again
};
});
}
}
});
});