summaryrefslogtreecommitdiffstats
path: root/doc/global/template/scripts/extras.js
diff options
context:
space:
mode:
Diffstat (limited to 'doc/global/template/scripts/extras.js')
-rw-r--r--doc/global/template/scripts/extras.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/global/template/scripts/extras.js b/doc/global/template/scripts/extras.js
index 409215f2d8..8a623a037e 100644
--- a/doc/global/template/scripts/extras.js
+++ b/doc/global/template/scripts/extras.js
@@ -4,7 +4,7 @@ $(function () {
$('a[href*=#]:not([href=#])').on('click', function (e) {
if (e.which == 2)
return true;
- var target = $(this.hash);
+ var target = $(this.hash.replace(/(\.)/g, "\\$1"));
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
setTimeout(function () {
@@ -15,10 +15,10 @@ $(function () {
$(window).load(function () {
var h = window.location.hash;
- var re = /[^a-z0-9_\#\-]/i
+ var re = /[^a-z0-9_\.\#\-]/i
if (h.length > 1 && !re.test(h)) {
setTimeout(function () {
- $(window).scrollTop($(h).offset().top - vOffset);
+ $(window).scrollTop($(h.replace(/(\.)/g, "\\$1")).offset().top - vOffset);
}, 0);
}
});