HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>New Document</title>
<meta charset="utf-8">
<link href="layout/css/index.css" type="text/css" rel="stylesheet" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="layout/js/scroll.js"></script>
</head>
<body>
<!-- entry part -->
<div class="entry" id="entry">
<div id="toplayer">
<a href="#home">test</a>
</div>
</div>
<!-- navbar part -->
<div class="navbar" id="navbar">
<div id="bar">
</div>
</div>
<!-- home part -->
<div class="home" id="home">
</div>
</body>
</html>
das ist der quellcode meiner seite an der ich gerade arbeite und wenn man auf test klickt soll es durch "scroll.js" geschmeidig zu #home scrollen....dazu sei gesagt ich habe die scroll.js mir aus google geholt und auf der html seite die ich von da habe funktioniert der effekt nur bei mir nicht...habe ich jquery falsch eingebunden oder fehlt mir was?
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="core.css">
<title>JQuery Interal Link Animation Scrolling</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="core.js"></script>
</head>
<body>
<section class="ad_container clearfix">
<div id="carbonads-container"><div class="carbonad"><div id="azcarbon"></div></div></div>
</section>
<section class="container">
<h2>JQuery Interal Link Animation Scrolling</h2>
<p>Click on the links below to see the scroll to effect.</p>
<ul class="nav">
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<div id="home">
<h2>Home</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tortor purus, placerat ut dignissim a, luctus ut magna. Nam posuere, purus eget ornare pellentesque, enim dolor sagittis lectus, nec porttitor nulla libero id quam. Sed vitae est felis, vitae sodales libero. Sed consectetur adipiscing elementum. Suspendisse magna diam, mollis a malesuada ut, rutrum a libero. Donec eget libero elit. Sed non augue ac magna porttitor posuere. Integer malesuada lorem sed augue fermentum vitae dictum lorem semper. Aliquam aliquam, justo sed placerat fringilla, magna erat placerat orci, a tristique risus ante at urna. Proin aliquet enim eget purus auctor eu interdum augue sagittis. Curabitur at dictum diam. Mauris risus est, tristique nec lobortis ut, ullamcorper quis nulla.</p>
</div>
<div id="about">
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tortor purus, placerat ut dignissim a, luctus ut magna. Nam posuere, purus eget ornare pellentesque, enim dolor sagittis lectus, nec porttitor nulla libero id quam. Sed vitae est felis, vitae sodales libero. Sed consectetur adipiscing elementum. Suspendisse magna diam, mollis a malesuada ut, rutrum a libero. Donec eget libero elit. Sed non augue ac magna porttitor posuere. Integer malesuada lorem sed augue fermentum vitae dictum lorem semper. Aliquam aliquam, justo sed placerat fringilla, magna erat placerat orci, a tristique risus ante at urna. Proin aliquet enim eget purus auctor eu interdum augue sagittis. Curabitur at dictum diam. Mauris risus est, tristique nec lobortis ut, ullamcorper quis nulla.</p>
</div>
<div id="services">
<h2>Services</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tortor purus, placerat ut dignissim a, luctus ut magna. Nam posuere, purus eget ornare pellentesque, enim dolor sagittis lectus, nec porttitor nulla libero id quam. Sed vitae est felis, vitae sodales libero. Sed consectetur adipiscing elementum. Suspendisse magna diam, mollis a malesuada ut, rutrum a libero. Donec eget libero elit. Sed non augue ac magna porttitor posuere. Integer malesuada lorem sed augue fermentum vitae dictum lorem semper. Aliquam aliquam, justo sed placerat fringilla, magna erat placerat orci, a tristique risus ante at urna. Proin aliquet enim eget purus auctor eu interdum augue sagittis. Curabitur at dictum diam. Mauris risus est, tristique nec lobortis ut, ullamcorper quis nulla.</p>
</div>
<div id="portfolio">
<h2>Portfolio</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tortor purus, placerat ut dignissim a, luctus ut magna. Nam posuere, purus eget ornare pellentesque, enim dolor sagittis lectus, nec porttitor nulla libero id quam. Sed vitae est felis, vitae sodales libero. Sed consectetur adipiscing elementum. Suspendisse magna diam, mollis a malesuada ut, rutrum a libero. Donec eget libero elit. Sed non augue ac magna porttitor posuere. Integer malesuada lorem sed augue fermentum vitae dictum lorem semper. Aliquam aliquam, justo sed placerat fringilla, magna erat placerat orci, a tristique risus ante at urna. Proin aliquet enim eget purus auctor eu interdum augue sagittis. Curabitur at dictum diam. Mauris risus est, tristique nec lobortis ut, ullamcorper quis nulla.</p>
</div>
<div id="contact">
<h2>Contact</h2>
<form>
<p>Name: <input type="text"></p>
<p>Email: <input type="text"></p>
<p>Message: <textarea></textarea></p>
</form>
</div>
<p style="text-align: center;">
<!-- Place this tag in the <head> of your document -->
<link href="https://plus.google.com/110725720433094046987" rel="publisher" />
<!-- Place this tag where you want the badge to render -->
<g:plus href="https://plus.google.com/110725720433094046987" width="300" height="131" theme="light"></g:plus></p>
<hr />
<p><a href="http://www.paulund.co.uk/smooth-scroll-to-internal-links-with-jquery">Return To Tutorial</a></p>
</section>
</body>
</html>
das ist die demo bei der der effekt funktioniert nicht ich verstehe nicht was ich anders mache...achsoo scroll.js und core.js sind ein und die selben javascript-dateien...jmd ne ahnung??