Skip to content

Commit 52f68a9

Browse files
authored
Merge pull request alvarotrigo#2424 from alvarotrigo/dev
Mergin dev branch 2.8.9
2 parents 7f995d7 + 0415e6a commit 52f68a9

31 files changed

+1324
-190
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: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
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-
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v2.8.8-brightgreen.svg)
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+
10+
![fullPage.js version](http://img.shields.io/badge/fullPage.js-v2.8.9-brightgreen.svg)
711
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
812
7Kb gziped!
913

@@ -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',
@@ -196,6 +202,8 @@ $(document).ready(function() {
196202
sectionSelector: '.section',
197203
slideSelector: '.slide',
198204

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

245253
### Creating smaller or bigger sections
246-
[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.
254+
[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.
247255
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.
248256

249257
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.
@@ -284,6 +292,8 @@ If you already use another lazy load solution which uses `data-src` as well, you
284292

285293
###Auto play/pause embedded media
286294

295+
**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+
287297
#### Play on section/slide load:
288298
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.
289299
In order to play it on section/slide load use instead the attribute `data-autoplay`. For example:
@@ -378,17 +388,25 @@ the fitting by the configured milliseconds.
378388

379389
- `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
380390

381-
- `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`.
391+
- `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`).
382392

383393
- `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.
384394

385395
- `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.
386396

387397
- `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.
388398

399+
- `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`. Requires fullPage.js >= 2.8.9.
400+
401+
- `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
402+
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:
403+
``` html
404+
<div class="section" data-percentage="80" data-centered="true">
405+
```
406+
389407
- `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.
390408

391-
- `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.
409+
- `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.
392410

393411
- `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.
394412

@@ -505,7 +523,7 @@ $.fn.fullpage.moveSlideLeft();
505523
---
506524
### setAutoScrolling(boolean)
507525
[Demo](http://codepen.io/alvarotrigo/pen/rVZWrR) Sets the scrolling configuration in real time.
508-
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.
526+
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.
509527

510528
```javascript
511529
$.fn.fullpage.setAutoScrolling(false);
@@ -528,7 +546,7 @@ $.fn.fullpage.setLockAnchors(false);
528546
```
529547
---
530548
### setAllowScrolling(boolean, [directions])
531-
[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
549+
[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
532550
would need to use `setKeyboardScrolling` for it.
533551

534552
- `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.
@@ -546,7 +564,7 @@ $.fn.fullpage.setAllowScrolling(false, 'down, right');
546564
```
547565
---
548566
### setKeyboardScrolling(boolean, [directions])
549-
[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).
567+
[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).
550568

551569
- `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.
552570

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

582-
- `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.
600+
- `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.
583601

584602
```javascript
585-
//destroy any plugin event (scrolls, hashchange in the URL...)
603+
//destroying all Javascript events created by fullPage.js (scrolls, hashchange in the URL...)
586604
$.fn.fullpage.destroy();
587605

588-
//destroy any plugin event and any plugin modification done over your original HTML markup.
606+
//destroying all Javascript events and any modification done by fullPage.js over your original HTML markup.
589607
$.fn.fullpage.destroy('all');
590608
```
591609
---
@@ -698,7 +716,7 @@ You can cancel the scroll by returning `false` on the `onLeave` callback:
698716

699717
---
700718
###afterRender()
701-
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).
719+
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.
702720

703721
Example:
704722

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

822840
#Contributing to fullpage.js
@@ -870,6 +888,7 @@ If you want your page to be listed here. Please <a href="mailto:alvaro@alvarotri
870888
- http://medoff.ua/en/
871889
- http://promo.prestigio.com/grace1/
872890
- http://www.mi.com/shouhuan
891+
- http://www.commoditiesdemystified.info/en/
873892
- https://moneytree.jp/
874893
- http://torchbrowser.com/
875894
- http://thekorner.fr/

0 commit comments

Comments
 (0)