Skip to content

Commit d168251

Browse files
committed
merge
2 parents 9f4913f + c57b7dc commit d168251

14 files changed

+1076
-89
lines changed

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2016 Alvaro Trigo <alvaro@alvarotrigo.com>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
![preview](https://raw.github.com/alvarotrigo/fullPage.js/master/examples/imgs/intro.png)
44
![compatibility](https://raw.github.com/alvarotrigo/fullPage.js/master/examples/imgs/compatible.gif)
55

6+
<p align="center">
7+
<a href="https://github.com/alvarotrigo/fullPage.js"><img src="https://raw.githubusercontent.com/alvarotrigo/fullPage.js/dev/examples/imgs/en-language.png" /></a><a href="https://github.com/alvarotrigo/fullPage.js/blob/dev/README_SPANISH.md#fullpagejs"><img src="https://raw.githubusercontent.com/alvarotrigo/fullPage.js/dev/examples/imgs/es-language-inactive.png" /></a>
8+
</p>
9+
610
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v2.8.8-brightgreen.svg)
711
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
812
7Kb gziped!
@@ -167,6 +171,8 @@ $(document).ready(function() {
167171
continuousHorizontal: false,
168172
scrollHorizontally: false,
169173
interlockedSlides: false,
174+
dragAndMove: false,
175+
offsetSections: false,
170176
resetSliders: false,
171177
fadingEffect: false,
172178
normalScrollElements: '#element1, .element2',
@@ -197,6 +203,8 @@ $(document).ready(function() {
197203
sectionSelector: '.section',
198204
slideSelector: '.slide',
199205

206+
lazyLoading: true,
207+
200208
//events
201209
onLeave: function(index, nextIndex, direction){},
202210
afterLoad: function(anchorLink, index){},
@@ -244,7 +252,7 @@ Note that section anchors can also be defined in the same way, by using the `dat
244252
**Be careful!** `data-anchor` tags can not have the same value as any ID element on the site (or NAME element for IE).
245253

246254
### Creating smaller or bigger sections
247-
[Demo](http://codepen.io/alvarotrigo/pen/BKjRYm) fullPage.js provides a way to remove the full height restriction from its sections and slides. It is possible to create sections which height is smaller or bigger thant the viewport. This is ideal for footers.
255+
[Demo](http://codepen.io/alvarotrigo/pen/BKjRYm) fullPage.js provides a way to remove the full height restriction from its sections and slides. It is possible to create sections which height is smaller or bigger than the viewport. This is ideal for footers.
248256
It is important to realise that it doesn't make sense to have all of your sections using this feature. If there is more than one section in the initial load of the site, the plugin won't scroll at all to see the next one as it will be already in the viewport.
249257

250258
To create smaller sections just use the class `fp-auto-height` in the section you want to apply it. It will then take the height defined by your section/slide content.
@@ -285,6 +293,8 @@ If you already use another lazy load solution which uses `data-src` as well, you
285293

286294
###Auto play/pause embedded media
287295

296+
**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).
297+
288298
#### Play on section/slide load:
289299
Using the attribute `autoplay` for videos or audio, or the param `autoplay=1` for youtube iframes will result in the media element playing on page load.
290300
In order to play it on section/slide load use instead the attribute `data-autoplay`. For example:
@@ -379,17 +389,25 @@ the fitting by the configured milliseconds.
379389

380390
- `touchSensitivity`: (default `5`) Defines a percentage of the browsers window width/height, and how far a swipe must measure for navigating to the next section / slide
381391

382-
- `continuousVertical`: (default `false`) Defines whether scrolling down in the last section or should scroll down to the first one or not, and if scrolling up in the first section should scroll up to the last one or not. Not compatible with `loopTop` or `loopBottom`.
392+
- `continuousVertical`: (default `false`) Defines whether scrolling down in the last section or should scroll down to the first one and if scrolling up in the first section should scroll up to the last one. Not compatible with `loopTop`, `loopBottom` or any scroll bar present in the site (`scrollBar:true` or `autoScrolling:false`).
383393

384394
- `continuousHorizontal`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Defines whether sliding right in the last slide should slide right to the first one or not, and if scrolling left in the first slide should slide left to the last one or not. Not compatible with `loopHorizontal`. Requires fullpage.js >= 2.8.3.
385395

386396
- `scrollHorizontally`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Defines whether to slide horizontally within sliders by using the mouse wheel or trackpad. Ideal for story telling`. Requires fullpage.js >= 2.8.3.
387397

388398
- `interlockedSlides`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Determines whether moving one horizontal slider will force the sliding of sliders in other section in the same direction. Possible values are `true`, `false` or an array with the interlocked sections. For example `[1,3,5]` starting by 1. Requires fullpage.js >= 2.8.3.
389399

400+
- `dragAndMove`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Enables or disables the dragging and flicking of sections and slides by using mouse or fingers. Possible values are `true`, `false`, `fingersonly`.
401+
402+
- `offsetSections`: (default `false`)[Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Provides a way to use non full screen sections based on percentage. Ideal to show visitors there's more content in the site by showing part of the next or previous section. Requires fullPage.js >= 2.8.8
403+
To define the percentage of each section the attribute `data-percentage` must be used. The centering of the section in the viewport can be determined by using a boolean value in the attribute `data-centered` (default to `true` if not specified). For example:
404+
``` html
405+
<div class="section" data-percentage="80" data-centered="true">
406+
```
407+
390408
- `resetSliders`: (default `false`). [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Defines whether or not to reset every slider after leaving its section. Requires fullpage.js >= 2.8.3.
391409

392-
- `fadingEffect`: (default `false`). [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Defines whether to use a fading effect or not instead of the default scrolling one. Possible values are `true`, `false`, `sections`, `slides`. It can therefore be applied just vertically or horizontally. Requires fullpage.js >= 2.8.6.
410+
- `fadingEffect`: (default `false`). [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Defines whether to use a fading effect or not instead of the default scrolling one. Possible values are `true`, `false`, `sections`, `slides`. It can therefore be applied just vertically or horizontally, or to both at the time. Requires fullpage.js >= 2.8.6.
393411

394412
- `animateAnchor`: (default `true`) Defines whether the load of the site when given an anchor (#) will scroll with animation to its destination or will directly load on the given section.
395413

@@ -508,7 +526,7 @@ $.fn.fullpage.moveSlideLeft();
508526
---
509527
### setAutoScrolling(boolean)
510528
[Demo](http://codepen.io/alvarotrigo/pen/rVZWrR) Sets the scrolling configuration in real time.
511-
Defines the way the page scrolling behaves. If it is set to `true`, it will use the "automatic" scrolling, otherwise, it will use the "manual" or "normal" scrolling of the site. Be careful when combining this option with `scrollOverflow` set to true, as it might be difficult to scroll using the mouse wheel or the trackpad when the section is scrollable.
529+
Defines the way the page scrolling behaves. If it is set to `true`, it will use the "automatic" scrolling, otherwise, it will use the "manual" or "normal" scrolling of the site.
512530

513531
```javascript
514532
$.fn.fullpage.setAutoScrolling(false);
@@ -531,7 +549,7 @@ $.fn.fullpage.setLockAnchors(false);
531549
```
532550
---
533551
### setAllowScrolling(boolean, [directions])
534-
[Demo](http://codepen.io/alvarotrigo/pen/EjeNdq) Adds or remove the possibility of scrolling through sections by using the mouse wheel/trackpad or touch gestures (which is active by default). Note this won't disable the keyboard scrolling. You
552+
[Demo](http://codepen.io/alvarotrigo/pen/EjeNdq) Adds or remove the possibility of scrolling through sections/slides by using the mouse wheel/trackpad or touch gestures (which is active by default). Note this won't disable the keyboard scrolling. You
535553
would need to use `setKeyboardScrolling` for it.
536554

537555
- `directions`: (optional parameter) Admitted values: `all`, `up`, `down`, `left`, `right` or a combination of them separated by commas like `down, right`. It defines the direction for which the scrolling will be enabled or disabled.
@@ -549,7 +567,7 @@ $.fn.fullpage.setAllowScrolling(false, 'down, right');
549567
```
550568
---
551569
### setKeyboardScrolling(boolean, [directions])
552-
[Demo](http://codepen.io/alvarotrigo/pen/GJXNwm) Adds or remove the possibility of scrolling through sections by using the keyboard arrow keys (which is active by default).
570+
[Demo](http://codepen.io/alvarotrigo/pen/GJXNwm) Adds or remove the possibility of scrolling through sections by using the keyboard (which is active by default).
553571

554572
- `directions`: (optional parameter) Admitted values: `all`, `up`, `down`, `left`, `right` or a combination of them separated by commas like `down, right`. It defines the direction for which the scrolling will be enabled or disabled.
555573

@@ -582,13 +600,13 @@ $.fn.fullpage.setScrollingSpeed(700);
582600
[Demo](http://codepen.io/alvarotrigo/pen/bdxBzv) Destroys the plugin events and optionally its HTML markup and styles.
583601
Ideal to use when using AJAX to load content.
584602

585-
- `type`: can be empty or `all`. If `all` is passed, the HTML markup and styles used by fullpage.js will be removed. This way the original HTML markup, the one used before any plugin modification is made, will be maintained.
603+
- `type`: (optional parameter) can be empty or `all`. If `all` is passed, the HTML markup and styles used by fullpage.js will be removed. This way the original HTML markup, the one used before any plugin modification is made, will be maintained.
586604

587605
```javascript
588-
//destroy any plugin event (scrolls, hashchange in the URL...)
606+
//destroying all Javascript events created by fullPage.js (scrolls, hashchange in the URL...)
589607
$.fn.fullpage.destroy();
590608

591-
//destroy any plugin event and any plugin modification done over your original HTML markup.
609+
//destroying all Javascript events and any modification done by fullPage.js over your original HTML markup.
592610
$.fn.fullpage.destroy('all');
593611
```
594612
---
@@ -701,7 +719,7 @@ You can cancel the scroll by returning `false` on the `onLeave` callback:
701719

702720
---
703721
###afterRender()
704-
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).
722+
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.
705723

706724
Example:
707725

@@ -819,7 +837,7 @@ You can cancel a move by returning `false` on the `onSlideLeave` callback. [Same
819837
#Reporting issues
820838
1. Please, look for your issue before asking using the github issues search.
821839
2. Make sure you use the latest fullpage.js version. No support is provided for older versions.
822-
3. Use the [the Github Issues forum](https://github.com/alvarotrigo/fullPage.js/issues) for create issues.
840+
3. Use the [the Github Issues forum](https://github.com/alvarotrigo/fullPage.js/issues) to create issues.
823841
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.
824842

825843
#Contributing to fullpage.js
@@ -873,6 +891,7 @@ If you want your page to be listed here. Please <a href="mailto:alvaro@alvarotri
873891
- http://medoff.ua/en/
874892
- http://promo.prestigio.com/grace1/
875893
- http://www.mi.com/shouhuan
894+
- http://www.commoditiesdemystified.info/en/
876895
- https://moneytree.jp/
877896
- http://torchbrowser.com/
878897
- http://thekorner.fr/

0 commit comments

Comments
 (0)