diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-15 09:09:23 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-15 09:09:24 +0200 |
commit | 605617b5dce6ccd8826d07aabe2db781ae3aa9b4 (patch) | |
tree | 9b014020fce4f53e92442c6914e5bc6f6264e879 /doc/global/template/scripts | |
parent | d370878aa0510e1e51eb9014965f505e395f3f81 (diff) | |
parent | d238f7e0190c49c0f07c24f2f4ef9a50577c389b (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
Diffstat (limited to 'doc/global/template/scripts')
-rw-r--r-- | doc/global/template/scripts/extras.js | 6 | ||||
-rw-r--r-- | doc/global/template/scripts/main.js | 6 |
2 files changed, 6 insertions, 6 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); } }); diff --git a/doc/global/template/scripts/main.js b/doc/global/template/scripts/main.js index 79de4ea5b2..823cebecf8 100644 --- a/doc/global/template/scripts/main.js +++ b/doc/global/template/scripts/main.js @@ -36,7 +36,7 @@ function load_sdk(s, id, src) { fjs.parentNode.insertBefore(js, fjs); } $(document).ready(function($) { - if (document.documentElement.clientWidth < 1220) { + if (document.documentElement.clientWidth < 1280) { oneQt.extraLinksToMain(); } @@ -76,7 +76,7 @@ $(document).ready(function($) { $(window).resize(function() { oneQt.stickySidebar(); oneQt.footerPosition(); - if (document.documentElement.clientWidth < 1220) { + if (document.documentElement.clientWidth < 1280) { oneQt.extraLinksToMain(); } else { oneQt.mainLinkstoExtra(); @@ -216,7 +216,7 @@ var oneQt = { var extramenuLinks = $('#menuextras').find('li'); var mainmenu = $('#mainmenu'); var count = 0; - if ($(extramenuLinks).length > 3) { + if ($(extramenuLinks).length > 2) { $(extramenuLinks).each(function() { if (count < 3) { var newLink = $(this); |