Search code examples
javascriptjquerynicescroll

NiceScroll not working on Html


I'm trying to get NiceScroll to work so that the whole body of the page scrolls, not just individual divs. It's not working. I've searched through similar forums with no work around. Here is my current code so far:

<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.nicescroll.js"></script>

<script>
$("html").mouseover(function() {
    $("#html").getNiceScroll().resize();
});
</script>

I've tried var nice = $("html").niceScroll(); as well, and it doesn't work either.

I also have these scripts at the bottom of the page, incase you need to know of other plugins:

<script src="js/jquery-migrate-1.2.1.js"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="js/jquery.scrollTo-min.js" type="text/javascript"></script>
<script src="js/waypoints.js" type="text/javascript"></script>
<script src="js/jquery.quicksand.js" type="text/javascript"></script>
<script src="js/modernizr.custom.js"></script>
<script src="js/jquery.magnific-popup.js" type="text/javascript"></script>
<script src="js/script.js" type="text/javascript"></script>

Any help is greatly appreciated.


Solution

  • If you try this:

    $("html").mouseover(function() {
        $("html").getNiceScroll().resize();
    });
    

    it works without errors on this JSFiddle, so I guess that's just the # in your query. What result did you expect?