[jQuery] Creating ScrollTo link with JQuery

[jQuery] Creating ScrollTo link with JQuery


Hi all, please help me .
I need help with creating link with JQuery scrollTo
.
This is the code that i created :
<a id="name1" href="#" onclick="function();">This will go to the part
of page with scrollTo</a>
<h3 id="name2" >This is the destination<h3>
I have write this code in <head> :
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.scrollTo.js" type="text/javascript"></script>
$(document).ready(function(){
        $('#name1 a').localScroll({ target:'#name2 h3', axis:'xy',
queue:true });
    };
But it still not working. Are there is any false that i do ?
Thanks for your help.