Skip to content

Commit 379c178

Browse files
committed
Browser support for IE7 and IE8
1 parent 6a75fc6 commit 379c178

29 files changed

Lines changed: 747 additions & 530 deletions

DOCUMENTATION.md

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ Both Sequence's [canvas](#animating-the-canvas) and [content](#animating-the-con
414414

415415
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).
416416

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.
418418

419419
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.
420420

@@ -579,28 +579,26 @@ Sequence aims to work fully in the latest versions of all major browsers that su
579579

580580
Please see the complete [list of supported browsers](https://github.com/IanLunn/Sequence/wiki/Sequence-v2-Browser-Support).
581581

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.
583583

584584
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:
585585

586586
```html
587-
<div id="sequence" style="white-space: nowrap;">
587+
<div id="sequence">
588588

589-
<div class="sequence-screen" style="overflow: hidden;">
590-
<ul class="sequence-canvas" style="position: relative; width: 100%; height: 100%;">
591-
<li style="width: 100%; height: 100%; white-space: normal; display: inline-block; position: relative;">
589+
<div class="sequence-screen" style="overflow: hidden; width: 100%; height: 100%;">
590+
<ul class="sequence-canvas" style="width: 100%; height: 100%;">
591+
<li style="position: absolute; width: 100%; height: 100%;">
592592
<!-- Step 1 content here -->
593593
</li>
594594
</ul>
595595
</div>
596596
</div>
597597
```
598598

599-
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).
602600

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/):
604602

605603
- [CSS Transitions](http://caniuse.com/#search=transitions)
606604
- [CSS Transforms](http://caniuse.com/#search=transforms)
@@ -756,7 +754,7 @@ Should you wish to override this setting, you can set `require3d` to `true` or `
756754

757755
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.
758756

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.
760758

761759
**Browser Support**: In modern browsers, animation is powered by CSS transitions and JavaScript in non-supporting browsers.
762760

@@ -773,7 +771,7 @@ Whether Sequence should automatically control the canvas animation when a step i
773771
There are two reasons you may want to disabled `animateCanvas`:
774772

775773
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).
777775

778776
#### `animateCanvasDuration`
779777

@@ -909,7 +907,7 @@ Any element can be used as a next/previous button, as long as it is given the sp
909907

910908
##### `nextButton`
911909

912-
- Type: true/false or a CSS selector
910+
- Type: true/false or a class/ID selector
913911
- Default: `true`
914912

915913
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
920918

921919
- `true`: Use a next button with the default CSS selector (`.sequence-next`)
922920
- `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
924922

925923
Note: the button must be added to the HTML manually.
926924

927925
##### `prevButton`
928926

929-
- Type: true/false or a CSS selector
927+
- Type: true/false or a class/ID selector
930928
- Default: `true`
931929

932930
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
937935

938936
- `true`: Use a previous button with the default CSS selector (`.sequence-prev`)
939937
- `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
941939

942940
Note: the button must be added to the HTML manually.
943941

@@ -957,15 +955,15 @@ Note: Sequence can either be soft paused or hard paused. Soft pause is used inte
957955

958956
##### `pauseButton`
959957

960-
- Type: true/false or a CSS selector
958+
- Type: true/false or a class/ID selector
961959
- Default: `true`
962960
- Dependencies: `autoPlay: true`
963961

964962
Defines a button that when clicked, pauses the autoPlay feature.
965963

966964
- `true`: Use a pause button with the default CSS selector (`.sequence-pause`)
967965
- `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
969967

970968
Note: the button must be added to the HTML manually.
971969

@@ -995,7 +993,7 @@ Pagination allows for a list of links that represents each step within Sequence.
995993

996994
##### `pagination`
997995

998-
- Type: true/false or a CSS selector
996+
- Type: true/false or a class/ID selector
999997
- Default: `true`
1000998

1001999
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:
10441042

10451043
- `true`: Use pagination with the default CSS selector (`.sequence-pagination`)
10461044
- `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
10481046

10491047
Note: the pagination elements must be added to the HTML manually.
10501048

@@ -1054,14 +1052,16 @@ Sequence's preloader allows the ability to hide content or display some form of
10541052

10551053
Sequence relies on the third-party [imagesLoaded](https://github.com/desandro/imagesloaded/) to determine when images have loaded.
10561054

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+
10571057
##### `preloader`
10581058

1059-
- Type: true/false or a CSS selector
1059+
- Type: true/false or a class/ID selector
10601060
- Default: `false`
10611061

10621062
- `true`: Append the default preloader element with the CSS selector (`.sequence-preloader`) to the Sequence element, and add the preloader styles to `<head></head>`
10631063
- `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
10651065

10661066
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.
10671067

@@ -1105,6 +1105,10 @@ CSS:
11051105
```css
11061106
.sequence-preloader {
11071107
position: absolute;
1108+
top: 0;
1109+
right: 0;
1110+
bottom: 0;
1111+
left: 0;
11081112
z-index: 9999;
11091113
height: 100%;
11101114
width: 100%;
@@ -1229,6 +1233,8 @@ When the left button is pressed, the Sequence event `self.prev()` is initiated.
12291233

12301234
Touch swipe capabilities are powered via the third-party library [Hammer.js](http://eightmedia.github.io/hammer.js/).
12311235

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+
12321238
#### `swipeNavigation`
12331239

12341240
- Type: true/false
@@ -1351,8 +1357,7 @@ Fallback mode options are included in the options of each instance of Sequence,
13511357
<script>
13521358
var options = {
13531359
fallback: {
1354-
speed: 500,
1355-
layout: "auto"
1360+
speed: 500
13561361
}
13571362
};
13581363

@@ -1371,17 +1376,6 @@ Note: When using 3D transforms to animate the canvas, please also see the [`requ
13711376

13721377
The speed at which steps should transition between one another when in fallback mode.
13731378

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-
13851379
## API
13861380

13871381
Sequence's API allows you to use its [properties](#properties), [methods](#methods) and [callbacks](#callbacks) to extend its functionality.

0 commit comments

Comments
 (0)