]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix for bug #1301
authorJirka Kosek <jirka@kosek.cz>
Wed, 4 Sep 2013 15:34:59 +0000 (15:34 +0000)
committerJirka Kosek <jirka@kosek.cz>
Wed, 4 Sep 2013 15:34:59 +0000 (15:34 +0000)
xsl/webhelp/template/common/main.js

index 5957fb435d6961fb1e5e090b00fb933786f49011..bcc116fb549e3ca118210011bde9cea4ebbbc8a1 100644 (file)
@@ -19,10 +19,10 @@ $(document).ready(function() {
                    && location.hostname == this.hostname) {
                    var $target = $(this.hash);
                    $target = $target.length && $target
-                       || $('[name=' + this.hash.slice(1) +']');
+                       || $('[id=' + this.hash.slice(1) +']');
                if (!(this.hash == "#searchDiv" || this.hash == "#treeDiv"  || this.hash == "") && $target.length) {
                        var targetOffset = $target.offset().top - 120;
-                       $('html,body')
+                       $('#content')
                            .animate({scrollTop: targetOffset}, 200);
                        return false;
                    }