skimo: 2 Javascripte blockieren sich

Beitrag lesen

Hallo miteinander,

ich komme mit meiner Unwissenheit einfach grad nicht weiter und bitte um Eure Hilfe. Ich habe zwei Skripte die einzeln gut funktionieren, nur zusammen blockieren die sich immer.

Skript 1

$(function(){  
	    $('a[href*=#]').click(function() {  
	    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')  
        && location.hostname == this.hostname) {  
	            var $target = $(this.hash);  
	            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');  
	            if ($target.length) {  
	                var targetOffset = $target.offset().top;  
	                $('html,body').animate({scrollTop: targetOffset}, 1000);  
	                return false;  
	            }  
	        }  
	    });  
	});

Skript 2:

jQuery.noConflict();  
  
jQuery(document).ready(function($) {  
  
        // Dock the header to the top of the window when scrolled past the banner.  
        // This is the default behavior.  
  
        $('#zwei').scrollToFixed();  
  
  
        // Dock the footer to the bottom of the page, but scroll up to reveal more  
        // content if the page is scrolled far enough.  
  
        $('.footer').scrollToFixed( {  
            bottom: 0,  
            limit: $('.footer').offset().top  
        });  
  
  
        // 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: $('#zwei').outerHeight(true) + 10,  
                limit: function() {  
                    var limit = 0;  
                    if (next) {  
                        limit = $(next).offset().top - $(this).outerHeight(true) - 10;  
                    } else {  
                        limit = $('.footer').offset().top - $(this).outerHeight(true) - 10;  
                    }  
                    return limit;  
                },  
                zIndex: 999  
            });  
        });  
    });

Und so sieht die Reihenfolge im Header aus:

<script src="js/jquery.min.js" type="text/javascript"></script>  
<script src="js/jquery-scrolltofixed.js" type="text/javascript"></script>  
<script src="js/scrolltofixed.js" type="text/javascript"></script>  
<script src="js/smooth-scroll.js" type="text/javascript"></script>

Hat irgendwer eine Ahnung warum das nicht funktioniert?

Vielen Dank schonmal im Vorraus.