]> granicus.if.org Git - docbook-dsssl/commitdiff
Webhelp: Avoid unnecessary scroll ups when anchor is clicked on
authorDavid Cramer <david@thingbag.net>
Fri, 13 Jan 2012 17:47:29 +0000 (17:47 +0000)
committerDavid Cramer <david@thingbag.net>
Fri, 13 Jan 2012 17:47:29 +0000 (17:47 +0000)
xsl/webhelp/template/common/main.js

index ee0f8f2f615b2a50b875e8bc55f8d8ad6a789271..fd4c4e4ab31a3044c91f585933123ad877cd68b0 100644 (file)
@@ -20,7 +20,7 @@ $(document).ready(function() {
                    var $target = $(this.hash);
                    $target = $target.length && $target
                        || $('[name=' + this.hash.slice(1) +']');
-               if (!(this.hash == "#searchDiv" || this.hash == "#treeDiv") && $target.length) {
+               if (!(this.hash == "#searchDiv" || this.hash == "#treeDiv"  || this.hash == "") && $target.length) {
                        var targetOffset = $target.offset().top - 110;
                        $('html,body')
                            .animate({scrollTop: targetOffset}, 200);