2015-02-19 3 views
1

Так что я пытаюсь использовать плагин JQuery для создания эффекта постраничной, как видно на http://www.florianwacker.de/en/JQuery Plug In не работает

Я нашел ссылку на плагин в 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. По какой-то причине страница ведет себя так, как будто есть только первая секция, а две другие «секции» просто не отображаются вообще.

Я просто не вижу, как я поступил не так.

ответ

3

Сценарий включения, включая заказ, поместите jquery.js в начало jquery.fullPage.js. Попробуйте что-то вроде этого,

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

Нет кубиков. :/ Все еще не работает. – Ed117

+0

Я просто скопировал остальную часть кода в FIDDLE http://jsfiddle.net/User86745458/3vjxpw7z/. Не могли бы вы проверить его? Благодарю. – user86745458

+0

Я чувствую себя настолько глупо ... Я оставил кусок кода в своем js-файле из предыдущего плагина, который я пытался использовать, и это мешало, все работает. Спасибо за ваше время. Я ценю это. – Ed117

Смежные вопросы