views:

223

answers:

1

I'm using the following jQuery plugins (along with the jQuery plugin):

<script type="text/javascript" src="scripts/jquery.scrollTo-min.js"></script> 
<script type="text/javascript" src="scripts/jquery.localscroll-min.js"></script> 
<script type="text/javascript" src="scripts/custom.js"></script> 

When I click this anchor link:

<a href="#contact">Contact me today!</a></p> 

It scrolls smoothly to my:

<div id="contact"> 

custom.js:

$(document).ready(function () {
        //smooth scrolling for all anchor links.
        $.localScroll({ speed: 2000, });
    });

It works in Firefox and Chrome but it doesn't work on IE. It just goes to #contact but not using the scrollTo or scrollLocal plugin.

+2  A: 

Are you sure about this , after speed: 2000?

$(document).ready(function () {
    //smooth scrolling for all anchor links.
    $.localScroll({ speed: 2000, });
});
Harmen
Good catch. IE doesn't like those trailing commas in object literals
ScottE
Thanks, removing that comma solved the problem.
janoChen