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
Copy file name to clipboardExpand all lines: DOCUMENTATION.md
+29-35Lines changed: 29 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -414,7 +414,7 @@ Both Sequence's [canvas](#animating-the-canvas) and [content](#animating-the-con
414
414
415
415
By default, Sequence controls the animation of the canvas automatically via the `animateCanvas`[option](#animateCanvas) and the speed of animation via the `animateCanvasDuration`[option](#animateCanvasDuration).
416
416
417
-
Note: Should you wish to modify how the canvas animates or apply additional styles, the container is given class names that represent the active step. When step1 is active, the container will have the class of `step1`, and so on.
417
+
Note: Should you wish to modify how the canvas animates or apply additional styles, the container is given class names that represent the active step, prefixed with `sequence-`. For example, when step1 is active, the container will have the class of `sequence-step1`, and so on.
418
418
419
419
Regardless of how you position steps, Sequence will find the offsetLeft and offsetTop (the final X/Y positions of an element after `top`, `margin`, `border` etc CSS properties are applied) then use these values to move the canvas so the current step is always shown within the container. Simply lay out steps as you wish -- using the CSS you are used to -- and Sequence will animate to an active step as necessary.
420
420
@@ -579,28 +579,26 @@ Sequence aims to work fully in the latest versions of all major browsers that su
579
579
580
580
Please see the complete [list of supported browsers](https://github.com/IanLunn/Sequence/wiki/Sequence-v2-Browser-Support).
581
581
582
-
In fallback mode, Sequence gives all steps a class of `animate-in` and will then restructure the canvas and steps so that they sit side-by-side, much like a traditional slider. When the user navigates between steps, the canvas is animated and moved to the relevant step. This way, the user still gets to see all of the content available in your Sequence theme, just without so many fancy effects. Animation of the canvas is controlled via JavaScript when in fallback mode.
582
+
In fallback mode, Sequence gives all steps a class of `animate-in` and will make each step `position: absolute`. When the user navigates between steps, the step's `left` position will be animated, the current step to `-100%` or `100%` (depending on the direction of navigation) and the next to `0` -- much like a traditional slider. This way, the user still gets to see all of the content available in your Sequence theme, just without so many fancy effects. In fallback mode, animation is controlled via JavaScript.
583
583
584
584
When in fallback mode, the Sequence container is given a class of `sequence-fallback` to allow you to change styles for a fallback theme accordingly and HTML structure is given the following styles via JavaScript:
In the above code example, `display: inline-block;` and `position: relative;` are only applied if self.options.fallback.layout is set to `"auto"` or `"basic"`.
600
-
601
-
The [Fallback Mode has two options](#fallback-mode) which allow you to change the [speed](#speed) of navigation between steps, and its [layout](#layout).
599
+
Speed of animation in [Fallback Mode](#fallback-mode) is controlled via the [speed option](#speed).
602
600
603
-
Please see feature support for each individual property on [caniuse.com](http://caniuse.com/):
601
+
Please see browser support for each individual property on [caniuse.com](http://caniuse.com/):
@@ -756,7 +754,7 @@ Should you wish to override this setting, you can set `require3d` to `true` or `
756
754
757
755
Canvas animation causes Sequence to automatically animate the canvas element to show the next step. Automatic animation consists of finding the next step's position and then directly animating to it.
758
756
759
-
If you'd like to customize how the canvas animates, set `animateCanvas` to `false`. Regardless of the `animateCanvas` option, the Sequence element is given a class representing the current step being viewed. `step1`, `step2`, and so on. These classes allow you to control canvas animation manually.
757
+
If you'd like to customize how the canvas animates, set `animateCanvas` to `false`. Regardless of the `animateCanvas` option, the Sequence element is given a class representing the current step being viewed. `sequence-step1`, `sequence-step2`, and so on. These classes allow you to control canvas animation manually.
760
758
761
759
**Browser Support**: In modern browsers, animation is powered by CSS transitions and JavaScript in non-supporting browsers.
762
760
@@ -773,7 +771,7 @@ Whether Sequence should automatically control the canvas animation when a step i
773
771
There are two reasons you may want to disabled `animateCanvas`:
774
772
775
773
1. You don't need the canvas to animate because its steps are layered on top of each other using `position: absolute;`.
776
-
2. You want to manually control the canvas animation. When step 1 is viewed, the Sequence element will be given the class of `step1`, and so on. Using these classes you can control animation manually using either CSS3 or JavaScript via Sequence's [API](#api).
774
+
2. You want to manually control the canvas animation. When step 1 is viewed, the Sequence element will be given the class of `seuence-step1`, and so on. Using these classes you can control animation manually using either CSS3 or JavaScript via Sequence's [API](#api).
777
775
778
776
#### `animateCanvasDuration`
779
777
@@ -909,7 +907,7 @@ Any element can be used as a next/previous button, as long as it is given the sp
909
907
910
908
##### `nextButton`
911
909
912
-
- Type: true/false or a CSS selector
910
+
- Type: true/false or a class/ID selector
913
911
- Default: `true`
914
912
915
913
Defines a button that when clicked, causes the current step to animate out and the next to animate in.
@@ -920,13 +918,13 @@ Defines a button that when clicked, causes the current step to animate out and t
920
918
921
919
-`true`: Use a next button with the default CSS selector (`.sequence-next`)
922
920
-`false`: Don't use a next button
923
-
-CSS Selector: Use a next button but change the default selector to something of your own liking.
921
+
-class/ID selector: Use a next button but change the default selector to a class/ID selector of you liking
924
922
925
923
Note: the button must be added to the HTML manually.
926
924
927
925
##### `prevButton`
928
926
929
-
- Type: true/false or a CSS selector
927
+
- Type: true/false or a class/ID selector
930
928
- Default: `true`
931
929
932
930
Defines a button that when clicked, causes the current step to animate out and the previous to animate in.
@@ -937,7 +935,7 @@ Defines a button that when clicked, causes the current step to animate out and t
937
935
938
936
-`true`: Use a previous button with the default CSS selector (`.sequence-prev`)
939
937
-`false`: Don't use a previous button
940
-
-CSS Selector: Use a previous button but change the default selector to something of your own liking.
938
+
-class/ID selector: Use a previous button but change the default selector to a class/ID selector of you liking
941
939
942
940
Note: the button must be added to the HTML manually.
943
941
@@ -957,15 +955,15 @@ Note: Sequence can either be soft paused or hard paused. Soft pause is used inte
957
955
958
956
##### `pauseButton`
959
957
960
-
- Type: true/false or a CSS selector
958
+
- Type: true/false or a class/ID selector
961
959
- Default: `true`
962
960
- Dependencies: `autoPlay: true`
963
961
964
962
Defines a button that when clicked, pauses the autoPlay feature.
965
963
966
964
-`true`: Use a pause button with the default CSS selector (`.sequence-pause`)
967
965
-`false`: Don't use a pause button
968
-
-CSS Selector: Use a pause button but change the default selector to something of your own liking.
966
+
-class/ID selector: Use a pause button but change the default selector to a class/ID selector of you liking
969
967
970
968
Note: the button must be added to the HTML manually.
971
969
@@ -995,7 +993,7 @@ Pagination allows for a list of links that represents each step within Sequence.
995
993
996
994
##### `pagination`
997
995
998
-
- Type: true/false or a CSS selector
996
+
- Type: true/false or a class/ID selector
999
997
- Default: `true`
1000
998
1001
999
Pagination associates immediate descendant elements within the pagination selector (`.sequence-pagination` by default) to each Sequence step. If `pagination` is `true`, the following HTML can be included in your document to act as pagination:
@@ -1044,7 +1042,7 @@ CSS:
1044
1042
1045
1043
-`true`: Use pagination with the default CSS selector (`.sequence-pagination`)
1046
1044
-`false`: Don't use pagination
1047
-
-CSS Selector: Use pagination but change the default selector to something of your own liking.
1045
+
-class/ID selector: Use pagination but change the default selector to a class/ID selector of you liking
1048
1046
1049
1047
Note: the pagination elements must be added to the HTML manually.
1050
1048
@@ -1054,14 +1052,16 @@ Sequence's preloader allows the ability to hide content or display some form of
1054
1052
1055
1053
Sequence relies on the third-party [imagesLoaded](https://github.com/desandro/imagesloaded/) to determine when images have loaded.
1056
1054
1055
+
**Browser Support**: [imagesLoaded](https://github.com/desandro/imagesloaded/) does not support Internet Explorer 7 due to its lack of [querySelectorAll](http://caniuse.com/#feat=queryselector) functionality. As such, Sequence's preloader will not operate when viewed in Internet Explorer 7.
1056
+
1057
1057
##### `preloader`
1058
1058
1059
-
- Type: true/false or a CSS selector
1059
+
- Type: true/false or a class/ID selector
1060
1060
- Default: `false`
1061
1061
1062
1062
-`true`: Append the default preloader element with the CSS selector (`.sequence-preloader`) to the Sequence element, and add the preloader styles to `<head></head>`
1063
1063
-`false`: Don't use a preloader
1064
-
-CSS Selector: Use a preloader but change the default selector to something of your own liking and don't use default styles, use your own instead.
1064
+
-class/ID selector: Use a preloader but change the default selector to a class/ID selector of you liking
1065
1065
1066
1066
When the preloader is being used, the Sequence element is give a class of `sequence-preloading` during the preloading phase, then `sequence-preloaded` when preloading is complete.
1067
1067
@@ -1105,6 +1105,10 @@ CSS:
1105
1105
```css
1106
1106
.sequence-preloader {
1107
1107
position: absolute;
1108
+
top: 0;
1109
+
right: 0;
1110
+
bottom: 0;
1111
+
left: 0;
1108
1112
z-index: 9999;
1109
1113
height: 100%;
1110
1114
width: 100%;
@@ -1229,6 +1233,8 @@ When the left button is pressed, the Sequence event `self.prev()` is initiated.
1229
1233
1230
1234
Touch swipe capabilities are powered via the third-party library [Hammer.js](http://eightmedia.github.io/hammer.js/).
1231
1235
1236
+
**Browser Support**: [Hammer.js](http://eightmedia.github.io/hammer.js/) does not support Internet Explorer 7 and 8 due to its lack of `addEventListener` functionality. As such, Sequence's touch swipe functionality will not operate when viewed in Internet Explorer 7 and 8.
1237
+
1232
1238
#### `swipeNavigation`
1233
1239
1234
1240
- Type: true/false
@@ -1351,8 +1357,7 @@ Fallback mode options are included in the options of each instance of Sequence,
1351
1357
<script>
1352
1358
var options = {
1353
1359
fallback: {
1354
-
speed:500,
1355
-
layout:"auto"
1360
+
speed:500
1356
1361
}
1357
1362
};
1358
1363
@@ -1371,17 +1376,6 @@ Note: When using 3D transforms to animate the canvas, please also see the [`requ
1371
1376
1372
1377
The speed at which steps should transition between one another when in fallback mode.
1373
1378
1374
-
##### `layout`
1375
-
1376
-
- Type: a string - `"auto"` | `"basic"` | `"custom"`
1377
-
- Default: `"auto"`
1378
-
1379
-
The layout to be used when in fallback mode.
1380
-
1381
-
-`"auto"`: Sequence will detect the best layout to use based on the `animateCanvas` option. If `animateCanvas `is false, the "basic" layout will be used. If `animateCanvas` is true, the "custom" layout is used
1382
-
-`"basic"`: Layout each step in one row using inline-block
1383
-
-`"custom"`: Assume the developer defined layout is to be used and don't layout the steps in any way.
1384
-
1385
1379
## API
1386
1380
1387
1381
Sequence's API allows you to use its [properties](#properties), [methods](#methods) and [callbacks](#callbacks) to extend its functionality.
0 commit comments