Question

I'm having trouble getting the fullPage plugin to function. This is my html code; I've checked that the jQuery works, and all the rest of the links to external code should be accurate. The only other code I've written is the CSS class for the background of each "page"'s div (simple 100% width, 683px height box, class="wrap"). I would really appreciate it if you could point out where I went wrong. (I couldn't get onepage.js to work either)

<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0">
  <title>index</title>
  <link href="http://fonts.googleapis.com/css?family=Montserrat:400" rel="stylesheet" type="text/css"/>
  <link rel="stylesheet" type="text/css" href="css/standardize.css"/>
  <link rel="stylesheet" type="text/css" href="css/index-grid.css"/>
  <link rel="stylesheet" type="text/css" href="css/index.css"/>

  <link rel="stylesheet" type="text/css" href="../jquery.fullPage.css"/>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  <script type="text/javascript" src="../jquery.fullPage.js"></script>
  <script type="text/javascript" src="../jquery.easings.min.js"></script>
  <script type="text/javascript">
    $(document).ready(function() {
        $.fn.fullpage();
    });
  </script>
    </script>
</head>
<body>
  <div class="section">
    <div class="wrap" style="background:orange">
    <h2>This is one test</h2>
    </div>
  </div>
  <div class="section">
    <div class="wrap" style="background:blue">
    <h2>Another test</h2>
    </div>

  </div>
  <div class="section">
    <div class="wrap" style="background:green">
    <h2>Third test</h2>
    </div>
  </div>
</body>
</html>
Was it helpful?

Solution

Use something like HTML Tidy to check the syntax of your HTML. It shows that you have an incorrect </script> tag and no doctype. You are missing jquery.ui.js which is present in the demo.

OTHER TIPS

You have two closed </script> tags, maybe that invalidates the code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top