Chris Mitchell
Chris Mitchell

Reputation: 39

fullpage.js and wordpress integration

I have a site:

URL: http://362.a07.myftpupload.com/ Password: aynhoe_park

I'm trying to make the scroll force to go from section to section instead of a normal page scroll.. I have tried setting in the fullpage.js (http://alvarotrigo.com/fullPage/) and I can't seem to get it to recognise it.

Can anyone have a look and help me get this working? As I can't seem to see why I can't get the page to scroll from one section to another like the fullpage.js site.

Upvotes: 0

Views: 3743

Answers (2)

Chris Mitchell
Chris Mitchell

Reputation: 39

Ok found the solution. The code I was using was wrong. It ended up being this jQuery library I needed to use : https://github.com/guins/jQuery.scrollSections

Which was

<script> jQuery(function() { jQuery('section.section').scrollSections(); }); </script>

With the accompanying js files.

Thanks for all your help :)

Upvotes: 1

Stewartside
Stewartside

Reputation: 20905

The problem lies with a misplaced ,.

This is your code currently

<script type="text/javascript">
    $(document).ready(function() {
        $.fn.fullpage({
            anchors: ['home','aboutus','ourblog','yourhost','thecollection','thehouse','exclusivehire',]
            menu: '.nav',
            scrollOverflow: true,
        });
    });
</script>

The anchors has an extra , in the [] but there isn't one after to say there are more elements coming.

Try this:

<script type="text/javascript">
    $(document).ready(function() {
        $.fn.fullpage({
            anchors: ['home','aboutus','ourblog','yourhost','thecollection','thehouse','exclusivehire'],
            menu: '.nav',
            scrollOverflow: true,
        });
    });
</script>

jQuery Problem

Try this:

<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery('#fullpage').fullpage();
        jQuery.fn.fullpage({
            anchors: ['home','aboutus','ourblog','yourhost','thecollection','thehouse','exclusivehire'],
            menu: '.nav',
            scrollOverflow: true,
        });
    });
</script>

Upvotes: 1

Related Questions