You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you prefer to use a CDN to load the needed files, fullPage.js is in CDNJS:
98
105
https://cdnjs.com/libraries/fullPage.js
99
106
100
-
###Required HTML structure
107
+
###Required HTML structure
101
108
Start your HTML document with the compulsory [HTML DOCTYPE declaration](http://www.corelangs.com/html/introduction/doctype.html) on the 1st line of your HTML code. You might have troubles with sections heights otherwise. The examples provided use HTML 5 doctype `<!DOCTYPE html>`.
102
109
103
110
Each section will be defined with an element containing the `section` class.
@@ -128,7 +135,7 @@ In order to create a landscape slider within a section, each slide will be defin
128
135
````
129
136
You can see a fully working example of the HTML structure in the [`demoPage.html` file](https://github.com/alvarotrigo/fullPage.js/blob/master/examples/demoPage.html).
130
137
131
-
###Initialization
138
+
###Initialization
132
139
All you need to do is call fullPage.js inside a `$(document).ready` function:
133
140
134
141
```javascript
@@ -275,7 +282,7 @@ Fullpage.js adds multiple classes in different elements to keep a record of the
275
282
-`fp-destroyed` is added to the fullpage.js container when fullPage.js is destroyed.
276
283
-`fp-enabled` is added to the `html` element once the libary is initalized.
277
284
278
-
###Lazy Loading
285
+
###Lazy Loading
279
286
[Demo](http://codepen.io/alvarotrigo/pen/eNLBXo) fullPage.js provides a way to lazy load images, videos and audio elements so they won't slow down the loading of your site or unnecessarily waste data transfer.
280
287
When using lazy loading, all these elements will only get loaded when entering in the viewport.
281
288
To enable lazy loading all you need to do is change your `src` attribute to `data-src` as shown below:
@@ -290,7 +297,7 @@ To enable lazy loading all you need to do is change your `src` attribute to `dat
290
297
291
298
If you already use another lazy load solution which uses `data-src` as well, you can disable the fullPage.js lazy loading by setting the option `lazyLoading: false`.
292
299
293
-
###Auto play/pause embedded media
300
+
###Auto play/pause embedded media
294
301
295
302
**Note**: the autoplay feature might not work on some mobile devices depending on the OS and browser (i.e. [Safari on iOS](https://webkit.org/blog/6784/new-video-policies-for-ios/) version < 10.0).
296
303
@@ -312,7 +319,7 @@ Embedded HTML5 `<video>` / `<audio>` and Youtube iframes are automatically paus
312
319
</audio>
313
320
```
314
321
315
-
###Use extensions
322
+
###Use extensions
316
323
fullpage.js [provides a set of extensions](http://alvarotrigo.com/fullPage/extensions/) you can use to enhance its default features. All of them are listed as [fullpage.js options](https://github.com/alvarotrigo/fullPage.js#options).
317
324
318
325
Extensions requires you to use the minified file [`jquery.fullpage.extensions.min.js`](https://github.com/alvarotrigo/fullPage.js/blob/master/dist/jquery.fullpage.extensions.min.js) that is inside the [`dist` folder](https://github.com/alvarotrigo/fullPage.js/tree/master/dist) instead of the usual fullPage.js file (`jquery.fullpage.js` or `jquery.fullpage.min.js`).
[Demo](http://codepen.io/alvarotrigo/pen/XbPNQv) You can see them in action [here](http://alvarotrigo.com/fullPage/examples/callbacks.html).
658
665
659
-
###afterLoad (`anchorLink`, `index`)
666
+
###afterLoad (`anchorLink`, `index`)
660
667
Callback fired once the sections have been loaded, after the scrolling has ended.
661
668
Parameters:
662
669
@@ -687,7 +694,7 @@ Example:
687
694
});
688
695
```
689
696
---
690
-
###onLeave (`index`, `nextIndex`, `direction`)
697
+
###onLeave (`index`, `nextIndex`, `direction`)
691
698
This callback is fired once the user leaves a section, in the transition to the new section.
692
699
Returning `false` will cancel the move before it takes place.
693
700
@@ -716,7 +723,7 @@ Example:
716
723
});
717
724
```
718
725
719
-
####Cancelling the scroll before it takes place
726
+
####Cancelling the scroll before it takes place
720
727
You can cancel the scroll by returning `false` on the `onLeave` callback:
721
728
722
729
```javascript
@@ -731,7 +738,7 @@ You can cancel the scroll by returning `false` on the `onLeave` callback:
731
738
```
732
739
733
740
---
734
-
###afterRender()
741
+
###afterRender()
735
742
This callback is fired just after the structure of the page is generated. This is the callback you want to use to initialize other plugins or fire any code which requires the document to be ready (as this plugin modifies the DOM to create the resulting structure). See [FAQs](https://github.com/alvarotrigo/fullPage.js/wiki/FAQ---Frequently-Answered-Questions) for more info.
736
743
737
744
Example:
@@ -745,7 +752,7 @@ Example:
745
752
});
746
753
```
747
754
---
748
-
###afterResize()
755
+
###afterResize()
749
756
This callback is fired after resizing the browser's window. Just after the sections are resized.
750
757
751
758
Example:
@@ -759,7 +766,7 @@ Example:
759
766
});
760
767
```
761
768
---
762
-
###afterResponsive(`isResponsive`)
769
+
###afterResponsive(`isResponsive`)
763
770
This callback is fired after fullpage.js changes from normal to responsive mode or from responsive mode to normal mode.
This callback is fired once the user leaves an slide to go to another, in the transition to the new slide.
816
823
Returning `false` will cancel the move before it takes place.
817
824
@@ -844,26 +851,27 @@ Example:
844
851
});
845
852
```
846
853
847
-
####Cancelling a move before it takes place
854
+
####Cancelling a move before it takes place
848
855
You can cancel a move by returning `false` on the `onSlideLeave` callback. [Same as when canceling a movement with `onLeave`](https://github.com/alvarotrigo/fullPage.js#cancelling-the-scroll-before-it-takes-place).
849
856
850
-
#Reporting issues
857
+
#Reporting issues
851
858
1. Please, look for your issue before asking using the github issues search.
852
859
2. Make sure you use the latest fullpage.js version. No support is provided for older versions.
853
860
3. Use the [the Github Issues forum](https://github.com/alvarotrigo/fullPage.js/issues) to create issues.
854
861
4.**An isolated reproduction of the issue will be required.** Make use of [jsfiddle](http://jsfiddle.net/97tbk/418/) or [codepen](http://codepen.io/alvarotrigo/pen/NxyPPp) for it if possible.
855
862
856
-
#Contributing to fullpage.js
863
+
#Contributing to fullpage.js
857
864
Please see [Contributing to fullpage.js](https://github.com/alvarotrigo/fullPage.js/wiki/Contributing-to-fullpage.js)
858
865
859
-
#Changelog
866
+
#Changelog
860
867
To see the list of recent changes, see [Releases section](https://github.com/alvarotrigo/fullPage.js/releases).
861
868
862
-
#Build tasks
869
+
#Build tasks
863
870
Want to build fullpage.js distribution files? Please see [Build Tasks](https://github.com/alvarotrigo/fullPage.js/wiki/Build-tasks)
0 commit comments