Skip to content

Commit 6dd426b

Browse files
committed
Merge pull request alvarotrigo#44 from AnSavvides/master
Improving README making it more readable and accurate.
2 parents a36d147 + effb97f commit 6dd426b

File tree

1 file changed

+32
-41
lines changed

1 file changed

+32
-41
lines changed

README.md

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
# fullPage.js
22

33
![preview](https://raw.github.com/alvarotrigo/fullPage.js/master/imgs/intro.png)
4-
A simple and easy to use plugin to create fullscreen scrolling websites. (also known as single page websites)
5-
It allows to create fullscren scrolling websites as well as adding some landscape sliders inside the sections of the site.
4+
A simple and easy to use plugin to create fullscreen scrolling websites (also known as single page websites).
5+
It allows the creation of fullscreen scrolling websites, as well as adding some landscape sliders inside the sections of the site.
66

7-
- [Living demo](http://alvarotrigo.com/fullPage/)
8-
- [Temporal Website] (http://alvarotrigo.com/blog/fullpage-jquery-plugin-for-fullscreen-scrolling-websites/)
7+
- [Live demo](http://alvarotrigo.com/fullPage/)
8+
- [Temporal Website](http://alvarotrigo.com/blog/fullpage-jquery-plugin-for-fullscreen-scrolling-websites/)
99

1010
## Introduction
11-
The plugin is in its first version and will keep improving with the time.
12-
Suggestion will be more than welcome, not only for requisites requests but also for coding improvements.
11+
The plugin is in its first version and will keep improving with time.
12+
Suggestion are more than welcome, not only for feature requests but also for coding style improvements.
1313

14-
Let's make of this a great plugin to make the world easier!
14+
Let's make this a great plugin to make people's lives easier!
1515

16-
Working under all modern browsers as well as old ones such as IE8, Opera 12...
16+
fullPage.js is fully functional on all modern browsers, as well as some old ones such as IE8 and Opera 12.
1717

1818
## Usage
19-
As you can see in the `example.html` file, you will need to include the javascript file `jquery.fullPage.js` (or the minified version `jquery.fullPage.min.js`) and the css file `jquery.fullPage.css`
20-
of the plugin as well as [jQuery library](http://jquery.com/) (and the [jQuery UI library](http://jqueryui.com/) in case you want to use easing effects. (active by default))
19+
As you can see in the `example.html` file, you will need to include the JavaScript file `jquery.fullPage.js` (or the minified version `jquery.fullPage.min.js`) and the css file `jquery.fullPage.css` of the plugin, as well as [jQuery](http://jquery.com/). Optionally, you can add the [jQuery UI library](http://jqueryui.com/) in case you want to use easing effects (this is active by default).
2120

2221
###Including files:
2322
```html
@@ -26,21 +25,20 @@ of the plugin as well as [jQuery library](http://jquery.com/) (and the [jQuery U
2625
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
2726
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
2827

29-
<!-- This line is needed in case of setting the plugin
28+
<!-- This is needed in the case of setting the plugin
3029
option `scrollOverflow` to `true` -->
3130
<script type="text/javascript" src="vendors/jquery.slimscroll.min.js"></script>
32-
3331
<script type="text/javascript" src="jquery.fullPage.js"></script>
3432
```
3533

3634
###Required HTML structure
3735
Each section will be defined with a `div` containing the `section` class.
3836
The active section by default will be the first section, which is taken as the home page.
3937
```html
40-
<div class="section">WHATEVER</div>
41-
<div class="section">WHATEVER</div>
42-
<div class="section">WHATEVER</div>
43-
<div class="section">WHATEVER</div>
38+
<div class="section">Some section</div>
39+
<div class="section">Some section</div>
40+
<div class="section">Some section</div>
41+
<div class="section">Some section</div>
4442
```
4543

4644
In order to create a landscape slider within a section, each slide will be defined with another `div`:
@@ -52,18 +50,18 @@ In order to create a landscape slider within a section, each slide will be defin
5250
<div class="slide"> Slide 4 </div>
5351
</div>
5452
````
55-
You can see a full example of the HTML structure in the [`example.html` file](https://github.com/alvarotrigo/fullPage.js/blob/master/example.html).
53+
You can see a fully working example of the HTML structure in the [`example.html` file](https://github.com/alvarotrigo/fullPage.js/blob/master/example.html).
5654

5755
###Initialization
58-
Then, you will only need to call the plugin inside `$(document).ready` function:
56+
All you need to do is call the plugin inside a `$(document).ready` function:
5957

6058
```javascript
6159
$(document).ready(function() {
6260
$.fn.fullpage();
6361
});
6462
```
6563

66-
A more complex initialization with all options could look like this:
64+
A more complex initialization with all options set could look like this:
6765
```javascript
6866
$(document).ready(function() {
6967
$.fn.fullpage({
@@ -92,14 +90,14 @@ $(document).ready(function() {
9290

9391
### Advance usage
9492
In order to create links to certain slides inside a section, you could do it by just adding two attributes to any element:
95-
- class="toSlide"
96-
- data-index="3" (or whatever slide number you want to link)
93+
- `class="toSlide"`
94+
- `data-index="3"` (or whatever slide number you want to link)
9795

9896
For example:
9997
```html
10098
<span class="toSlide" data-index="3">Click here to go to slide 3</span>
10199
```
102-
[Living example](http://jsfiddle.net/7PwsS/15/)
100+
[Live example](http://jsfiddle.net/7PwsS/15/)
103101

104102
To create links between sections, you could use the `menu` option and make use of anchor links (#) as explained below in the options section.
105103

@@ -119,21 +117,18 @@ $.fn.fullpage({
119117
```
120118

121119
- `easing`: (default `easeInQuart`) Defines the transition effect to use for the vertical scrolling.
122-
It requieres [jQuery UI library](http://jqueryui.com/) in case of using some of its transitions. Other library could be used instead.
120+
It requieres [jQuery UI](http://jqueryui.com/) for using some of its transitions. Other libraries could be used instead.
123121

124122
- `loopTop`: (default `false`) Defines whether scrolling up in the first section should scroll to the last one or not.
125123

126124
- `loopBottom`: (default `false`) Defines whether scrolling down in the last section should scroll to the first one or not.
127125

128-
- `css3`: (default `false`). Defines wheter to use javascript or CSS3 transforms to scroll within sections and slides. Useful to speed up the movement in
129-
tablet and mobile devices with browsers supporting CSS3.
126+
- `css3`: (default `false`). Defines wheter to use JavaScript or CSS3 transforms to scroll within sections and slides. Useful to speed up the movement in tablet and mobile devices with browsers supporting CSS3.
130127

131-
- `autoScrolling`: (default `true`) Defines whether to use the "automatic" scrolling or the "normal" one. It also
132-
has influence on the way the sections fit the browser/device window in tablets and mobile phones.
128+
- `autoScrolling`: (default `true`) Defines whether to use the "automatic" scrolling or the "normal" one. It also has affects the way the sections fit in the browser/device window in tablets and mobile phones.
133129

134-
- `menu`: (default `false`) A selector can be used to specify the menu to link with the slides. This way
135-
the scrolling of the slides will activate the corresponding element in the menu using the class `active`.
136-
This won't generate a menu but will just add the `active` class to the element in the given menu with the corresponding anchor link.
130+
- `menu`: (default `false`) A selector can be used to specify the menu to link with the slides. This way the scrolling of the slides will activate the corresponding element in the menu using the class `active`.
131+
This won't generate a menu but will just add the `active` class to the element in the given menu with the corresponding anchor links.
137132
In order to link the elements of the menu with the slides, an HTML 5 data-tag (`data-menuanchor`) will be needed to use with the same anchor links as
138133
used within the sections. Example:
139134
```html
@@ -151,12 +146,12 @@ $.fn.fullpage({
151146
});
152147
```
153148

154-
- `navigation`: (default `false`) If sets to `true` , it will show a navigation bar composed by small circles.
149+
- `navigation`: (default `false`) If set to `true`, it will show a navigation bar made up of small circles.
155150

156-
- `navigationPosition`: (default `right`) It can be set to `left` or `right` and defines in which position the navigation bar will be shown in case of using one.
151+
- `navigationPosition`: (default `right`) It can be set to `left` or `right` and defines which position the navigation bar will be shown (if using one).
157152

158-
- `scrollOverflow`: (default `false`) defines whether or not to create an scroll for the section in case its content is bigger than the height of it.
159-
In case of setting it to `true`, it requieres the vendor plugin `jquery.slimscroll.min` and it should be loaded before fullPaje.js plugin. For example:
153+
- `scrollOverflow`: (default `false`) defines whether or not to create a scroll for the section in case its content is bigger than the height of it.
154+
In case of setting it to `true`, it requieres the vendor plugin [`jquery.slimscroll.min`](https://github.com/rochal/jQuery-slimScroll) and it should be loaded before the fullPaje.js plugin. For example:
160155

161156
```html
162157
<script type="text/javascript" src="vendors/jquery.slimscroll.min.js"></script>
@@ -192,18 +187,15 @@ $.fn.fullpage.moveToSlide(3);
192187

193188
### setAutoScrolling
194189
Sets the scrolling configuration in real time.
195-
Defines the way the page scrolling behaves. If it is set to `true`, it will use the "automatic" scrolling,
196-
otherwise, it will use the "manual" or "normal" scrolling of the site. Be careful when combining this option with
197-
`scrollOverflow` set to true, as it might be difficult to scroll using the mouse wheel or the trackpad when the section
198-
is scrollable.
190+
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.
199191

200192
```javascript
201193
$.fn.fullpage.setAutoScrolling('false');
202194
```
203195

204196
## Callbacks
205197
**afterLoad** (`anchorLink`, `index`)
206-
Callback fired once the sections has been loaded, once the scrolling has ended.
198+
Callback fired once the sections have been loaded, after the scrolling has ended.
207199
Parameters:
208200

209201
- `anchorLink`: anchorLink corresponding to the section.
@@ -253,8 +245,7 @@ Example:
253245

254246

255247
**afterRender** ()
256-
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
257-
fire any code which requieres the document to be ready. (as this plugin modifies the document DOM to create the resulting structure)
248+
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).
258249

259250
Example:
260251

0 commit comments

Comments
 (0)