Skip to content

Commit dc69541

Browse files
committed
- Added new feature to create an scrollable section by using pp-scrollable.
1 parent 756e349 commit dc69541

File tree

4 files changed

+35
-20
lines changed

4 files changed

+35
-20
lines changed

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pagePiling.js",
3-
"version": "1.3",
3+
"version": "1.4",
44
"homepage": "https://github.com/alvarotrigo/pagePiling.js",
55
"authors": [
66
"Alvaro Trigo https://github.com/alvarotrigo"
@@ -33,6 +33,6 @@
3333
"examples"
3434
],
3535
"dependencies": {
36-
"jquery": "1.11.1"
36+
"jquery": ">=1.7.0"
3737
}
3838
}

jquery.pagepiling.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ===========================================================
2-
* pagepiling.js 0.0.1 (Beta)
2+
* pagepiling.js 1.4
33
*
44
* https://github.com/alvarotrigo/fullPage.js
55
* MIT licensed
@@ -123,3 +123,7 @@ html, body {
123123
.pp-tooltip.left {
124124
left: 20px;
125125
}
126+
.pp-scrollable{
127+
overflow-y: scroll;
128+
height: 100%;
129+
}

jquery.pagepiling.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ===========================================================
2-
* pagepiling.js 1.3
2+
* pagepiling.js 1.4
33
*
44
* https://github.com/alvarotrigo/pagePiling.js
55
* MIT licensed
@@ -207,7 +207,6 @@
207207
$.isFunction( options.afterRender ) && options.afterRender.call( this);
208208
});
209209

210-
211210
/**
212211
* Enables vertical centering by wrapping the content and the use of table and table-cell
213212
*/
@@ -614,6 +613,18 @@
614613
}
615614
}
616615

616+
/**
617+
* Return a boolean depending on whether the scrollable element is at the end or at the start of the scrolling
618+
* depending on the given type.
619+
*/
620+
function isScrolled(type, scrollable){
621+
if(type === 'top'){
622+
return !scrollable.scrollTop();
623+
}else if(type === 'bottom'){
624+
return scrollable.scrollTop() + 1 + scrollable.innerHeight() >= scrollable[0].scrollHeight;
625+
}
626+
}
627+
617628
/**
618629
* Determines whether the active section or slide is scrollable through and scrolling bar
619630
*/

jquery.pagepiling.min.js

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)