css header

This commit is contained in:
2024-03-06 14:57:51 +01:00
parent 4853f2d7ab
commit c391226f1f
3 changed files with 32 additions and 28 deletions

View File

@@ -43,20 +43,20 @@
// //// ancre dans texte au click parragraphe correspondant arrive en dessous du header
(function($, window) {
var adjustAnchor = function() {
var $anchor = $('.sidebar_first_container'),
fixedElementHeight = 350;
if ($anchor.length > 0) {
$('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);
}
};
// (function($, window) {
// var adjustAnchor = function() {
// var $anchor = $('.sidebar_first_container'),
// fixedElementHeight = 350;
// if ($anchor.length > 0) {
// $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);
// }
// };
$(window).on('hashchange', function() {
adjustAnchor();
});
// $(window).on('hashchange', function() {
// adjustAnchor();
// });
})(jQuery, window);
// })(jQuery, window);