Hallo,

ich habe ein Java Script eingesetzt, damit das Menü nicht aus dem Bildschirm scrollt, also gefixed wird.
Wenn ich die Seite nun aber wieder nach oben scrolle, ist das Menü 51,5 Pixel vom oberen Rand entfernt.
Ich weiß nicht warum das so ist, finde den Fehler nicht.

Kann mir jemand helfen?

www.bielefeld.gutachten.ag

Gruss Guido


Code:
<script>
    $(document).ready(function() {

        // Dock the header to the top of the window when scrolled past the banner.
        // This is the default behavior.

        $('#header').scrollToFixed({ marginTop: 0 });

        // Dock each summary as it arrives just below the docked header, pushing the
        // previous summary up the page.

        var summaries = $('.summary');
        summaries.each(function(i) {
        var summary = $(summaries[i]);
        var next = summaries[i + 1];

            summary.scrollToFixed({
              marginTop: $('#header').outerHeight(true) + 10,
              limit: function() {
                    var limit = 0;
                    if (next) {
                        limit = $(next).offset().top - $(this).outerHeight(true) - 10;
                    } else {
                    }
                    return limit;
                },
                zIndex: 999
            });
        });
     });
</script>