0

我无法让 fullPage 插件正常工作。这是我的html代码;我已经检查了 jQuery 是否可以正常工作,并且所有其他外部代码的链接都应该是准确的。我编写的唯一其他代码是每个“页面”的 div 的背景的 CSS 类(简单的 100% 宽度,683px 高度框,class="wrap")。如果您能指出我哪里出错了,我将不胜感激。(我也无法让 onepage.js 工作)

<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>
4

2 回答 2

1

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.

于 2014-04-07T07:40:45.277 回答
1

您有两个封闭</script>标签,可能会使代码无效。

于 2014-04-07T07:32:46.960 回答