jQuery插件不起作用

jQuery Plug In not functioning

本文关键字:不起作用 插件 jQuery      更新时间:2024-01-07

所以我尝试使用jQuery插件来创建分页效果,如上所示http://www.florianwacker.de/en/

我在找到了一个插件的链接http://www.alvarotrigo.com/fullPage/

这看起来很直接,但我无法让它发挥作用。

这是HTML

<head>
    <title>Aldi Rebrand</title>
    <link rel="stylesheet" type="text/css" href="css/jquery.fullPage.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <script type="text/javascript" src="js/jquery.fullPage.js"></script>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/script.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#fullpage').fullpage();
        });
    </script>
</head>
<body class="red">
    <div id="navBar">
        <a href="index.html"><img id="navLogo" src="images/navLogo.png"></a>
        <ul>
            <li class = "navLink mainLink"><a href="index.html">Work</a></li>
            <li class = "navLink mainLink"><a href="about.html">About</a></li>
            <li class = "navLink mainLink"><a href="https://ggann.tumblr.com">Blog</a></li>
        </ul>
    </div>
        <div id="fullpage">
            <div class="section">
                <div id="aldiPhoto"></div>
                <div id="descriptionAldi">
                    <h2>ALDI Rebrand <span>BRANDING | LOGO | PRINT</span></h2>
                    <p class="intro"><strong>ALDI</strong> is an international grocer, spanning from Germany to The United States and many other countries around the world.</p>
                    <p class="prjctDescription">The premise behind this semester long project was to immerse ourselves in the company/brand we were assigned. I was assigned ALDI. In this scenario, the goal of the rebrand was to convey a new “fresh and local” side to ALDI and their proposed farmers market addition to their stores. We were asked to create a brand new logo, at least four pieces of collateral and a brand guideline to demonstrate our research, branding applications and flexibility.</p>
                    <div class="btnDiv">
                        <a href="https://dribbble.com/shots/1869394-ALDI-Rebrand" class="btnText"><div class="btn1"><p>VIEW ON DRIBBBLE</p></div></a>
                        <a href="https://www.behance.net/gallery/22556203/ALDI-Rebrand" class="btnText"><div class="btn2"><p>VIEW ON BEHANCE</p></div></a>
                    </div>
                </div>
            </div>
            <div class="section">
                <div id="aldiPage2"></div>
            </div>
            <div class="section">
                <div id="aldiPage3"></div>
            </div>
        </div>
    <div class="ticker"><p class="currentPage">1</p><div class="tickerBtm"><p class="maxPage">3</p></div></div>
</body>

这是我的网站的css

a {
    color: #ffffff;
    font-size: 1em;
    font-family: Helvetica, Arial, sans-serif;
    cursor: pointer;
    text-decoration: none;
}
body {
    padding: 0px;
    margin: 0px;
    height: 100%;
}
body.red {
    background-color: #d04b47;
}
div {
    margin: 0px;
    padding: 0px;
}
h1 {
    color: #ffffff;
    font-size: 10em;
    padding: 20px;
    margin-bottom: 0px;
    line-height: .85em;
}
h2 {
    color: #d04b47;
    font-size: 1em;
    margin-left: 10%;
    margin-top: 20%;
    margin-bottom: 0px;
    line-height: .85em;
    font-family: Helvetica, Arial, sans-serif;
}
h2 span {
    color: #b1b3b6;
    font-size: .25em;
    font-weight: 100;
    padding-left: 25px;
}
section {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}
ul {
    margin: 0;
    padding: 0;
    border: 0;
    display: inline-flex;
}
/* BLOG POST TALL CONCEPT */
h2.blgHead {
    color: #d04b47;
    font-size: 3em; 
    margin-right: 10%;
    margin-left: 10%;
    margin-top: 25%;
    margin-bottom: 0px;
    line-height: 1.25em;
    font-family: Helvetica, Arial, sans-serif;
}
h2.blgHead span {
    color: #b1b3b6;
    font-size: .25em;
    font-weight: 100;
    padding-left: 25px;
}
.blgDescription {
    color: #000000;
    margin-left: 10%;
    margin-right: 10%;
    padding: 0px;
    font-size: .75em;
    line-height: 1.5em;
}
.blgIntro {
    clear: both;
    margin: 0px;
    margin-top: 15px;
    margin-left: 10%;
    margin-right: 10%;
    color: #000000;
    font-size: 1.25em;
    line-height: 1.5em;
}
.blogPostTall {
    overflow: hidden;
    float: left;
    display: none;
    width: 25%;
    margin: 0px;
    padding: 0px;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
.btn1 {
    position: absolute;
    left: 0px;
    margin-left: 10%;
    margin-top: 7%;
    border: solid #d04b47 2px;
    width: 12em;
    -moz-transition: all 0.25s ease; /* Firefox 4 */
    -webkit-transition: all 0.25s ease; /* Safari and Chrome */
    -o-transition: all 0.25s ease; /* Opera */
}
.btn1:hover {
    color: #ffffff;
    margin-left: 9%;
    margin-top: 7%;
    border: solid #d04b47 2px;
    background-color: #d04b47;
    width: 13em;
}
.btn2 {
    position: absolute;
    right: 0px;
    margin-right: 10%;
    margin-top: 7%;
    border: solid #d04b47 2px;
    width: 12em;
    -moz-transition: all 0.25s ease; /* Firefox 4 */
    -webkit-transition: all 0.25s ease; /* Safari and Chrome */
    -o-transition: all 0.25s ease; /* Opera */
}
.btn2:hover {
    color: #ffffff;
    margin-right: 9%;
    margin-top: 7%;
    border: solid #d04b47 2px;
    background-color: #d04b47;
    width: 13em;
}
.btnDiv {
    position: relative;
    width: 100%;
}
.btnText {
    color: #d04b47;
    font-size: 1em;
    font-family: Helvetica, Arial, sans-serif;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.description {
    color: #ffffff;
    padding-left: 20px;
    padding-right: 50px;
    line-height: 1.5em;
}
.intro {
    color: #000000;
    font-size: 2em;
    padding-left: 10%;
    padding-right: 10%;
    line-height: 1.5em;
}
.prjctDescription {
    color: #000000;
    padding-left: 10%;
    padding-right: 10%;
    line-height: 1.5em;
}
.category {
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
    filter: alpha(opacity=(50));
    opacity: 0.5;
    color: #000000;
    font-size: .85em;
    font-weight: 100;
    -moz-transition: all 0.25s ease; /* Firefox 4 */
    -webkit-transition: all 0.25s ease; /* Safari and Chrome */
    -o-transition: all 0.25s ease; /* Opera */
}
.category:hover {
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
    filter: alpha(opacity=(100));
    opacity: 1;
    color: #ffffff;
    font-size: .85em;
    font-weight: 100;
}
.galleryImg {
    display: inline-flex;
    width: 25%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
.hidden {
    opacity: 0.25;
}
.mainLink {
    font-size: .85em;
    font-weight: 800;
    -moz-transition: all 0.25s ease; /* Firefox 4 */
    -webkit-transition: all 0.25s ease; /* Safari and Chrome */
    -o-transition: all 0.25s ease; /* Opera */
}
.navLink {
    display: inline-flex;
    position: relative;
    margin-left: 22px;
}
.currentPage {
    margin-bottom: .25em;
    margin-left: .5em;
    margin-right: .5em;
    margin-top: .5em;
    padding: 0px;
    color: #ffffff;
    font-size: 1em;
    font-family: Helvetica, Arial, sans-serif;
}
.maxPage {
    margin-bottom: .25em;
    margin-left: .5em;
    margin-right: .5em;
    margin-top: 0em;
    padding: 0px;
    color: #ffffff;
    font-size: 1em;
    font-family: Helvetica, Arial, sans-serif;
}
.ticker {
    bottom: 0px;
    left: 0px;
    position: fixed;
    border: solid #ffffff 2px;
    margin: 1.5em;
    padding: 0px;
}
.tickerBtm {
    width: 1.5em;
    bottom: 0px;
    left: 0px;
    border-top: solid #ffffff 2px;
    margin: 0px;
    padding-top: .5em;
}
#aboutPhoto {
    background-image: url(../images/Red2.jpg);
    background-position: top,left;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    float: left;
    width: 50%;
    height: 100vh;
}
#aldiPhoto {
    background-image: url(../images/aldiLarge.jpg);
    background-position: top left;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    float: left;
    width: 50%;
    height: 100vh;
}
#aldiPage2 {
    background-image: url(../images/aldiPattern.jpg);
    background-position: top left;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#aldiPage3 {
    background-image: url(../images/Jar1.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#aldi {
    float: left;
    width: 50%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
#createathon {
    clear: both;
    width: 25%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
#description {
    float: right;
    width: 50%;
    height: 100vh;
    background-color: #d04b47;
}
#descriptionAldi {
    float: right;
    width: 50%;
    height: 100vh;
    background-color: #ffffff;
}
#elloPhoto {
    background-image: url(../images/Ello.gif);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    float: left;
    width: 50%;
    height: 100vh;
}
#everlane {
    clear: both;
    width: 25%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
#fincher {
    width: 50%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
#fincherPhoto {
    background-image: url(../images/fincher1.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    float: left;
    width: 50%;
    height: 100vh;
}
#fincherPage2 {
    background-image: url(../images/fincher3.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#fincherPage3 {
    background-image: url(../images/fincher4.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#fincherPage4 {
    background-image: url(../images/fincher5.jpg);
    background-position: top left;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#fincherPage5 {
    background-image: url(../images/fincher6.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    width: 100%;
    height: 100vh;
}
#fincherPage6 {
    background-image: url(../images/fincher7.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#fincherPage7 {
    background-image: url(../images/fincher8.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#fincherPage8 {
    background-image: url(../images/fincher9.gif);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#mobmail {
    clear: both;
    width: 25%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
#myLogo {
    clear: inherit;
    float: left;
    width: 50%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
#navBar {
    z-index: 1;
    position: fixed;
    margin-top: 0px;
    padding: 20px;
    border: 0px;
    width: 100%;
    background-color: #d04b47;
    -moz-transition: all .25s; /* Firefox 4 */
    -webkit-transition: all .25s; /* Safari and Chrome */
    -o-transition: all .25s; /* Opera */
}
#navBar.scroll {
    margin-top: -48px;
}
#navBar.scroll:hover{
    margin-top: 0px;
}
#navLogo {
    display: inline-flex;
    height: 20px;
    margin-top: -5px;
    margin-right: 5px;
    margin-left: 5px;
    margin-bottom: -5px;
}
#pact {
    float: left;
    width: 25%;
    margin: 0px;
    margin-bottom: -4px;
    padding: 0px;
    transition: all 1s;
    -moz-transition: all 1s; /* Firefox 4 */
    -webkit-transition: all 1s; /* Safari and Chrome */
    -o-transition: all 1s; /* Opera */
}
#rcfPhoto {
    background-image: url(../images/rcf1.JPG);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    float: left;
    width: 50%;
    height: 100vh;
}
#rcfPage2 {
    background-image: url(../images/rcf2.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#rcfPage3 {
    background-image: url(../images/rcf3.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}
#rcfPage4 {
    background-image: url(../images/rcf4.JPG);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #d04b47;
    clear: both;
    width: 100%;
    height: 100vh;
}

我使用了提供的css和js文件,您可以在我的html头部看到。不管出于什么原因,页面的行为就像只有第一个部分,而其他两个"部分"根本没有显示一样。

我只是不明白我怎么会在这里出错。

切换包含订单的脚本,将jquery.js放在jquery.fullPage.js的顶部

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.fullPage.js"></script>