2002103baa
This change fixes a number of issues in the online template: - Missing vertical line after the login icon in the header - Update header, footer links and appearance - Adjust alternate background color of table cells to improve readability - Fix style of cookie notification in the html header - Add The Qt Company logo in the footer - Adjust list item marker image - Improve responsiveness of footer Change-Id: I77147b4b4161d6001c095a4b67e15552132100e6 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
25 lines
702 B
JavaScript
25 lines
702 B
JavaScript
var vOffset = 65;
|
|
|
|
$(function () {
|
|
$('a[href*=#]:not([href=#])').on('click', function (e) {
|
|
if (e.which == 2)
|
|
return true;
|
|
var target = $(this.hash);
|
|
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
|
|
if (target.length) {
|
|
setTimeout(function () {
|
|
$('html, body').animate({scrollTop: target.offset().top - vOffset}, 50);}, 50);
|
|
}
|
|
});
|
|
});
|
|
|
|
$(window).load(function () {
|
|
var h = window.location.hash;
|
|
var re = /[^a-z0-9_\#\-]/i
|
|
if (h.length > 1 && !re.test(h)) {
|
|
setTimeout(function () {
|
|
$(window).scrollTop($(h).offset().top - vOffset);
|
|
}, 0);
|
|
}
|
|
});
|