Skip to content

Commit

Permalink
- Added new feature to create an scrollable section by using `pp-scro…
Browse files Browse the repository at this point in the history
…llable`.
  • Loading branch information
alvarotrigo committed Mar 24, 2015
1 parent 756e349 commit dc69541
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 20 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pagePiling.js",
"version": "1.3",
"version": "1.4",
"homepage": "https://github.com/alvarotrigo/pagePiling.js",
"authors": [
"Alvaro Trigo https://github.com/alvarotrigo"
Expand Down Expand Up @@ -33,6 +33,6 @@
"examples"
],
"dependencies": {
"jquery": "1.11.1"
"jquery": ">=1.7.0"
}
}
6 changes: 5 additions & 1 deletion jquery.pagepiling.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ===========================================================
* pagepiling.js 0.0.1 (Beta)
* pagepiling.js 1.4
*
* https://github.com/alvarotrigo/fullPage.js
* MIT licensed
Expand Down Expand Up @@ -123,3 +123,7 @@ html, body {
.pp-tooltip.left {
left: 20px;
}
.pp-scrollable{
overflow-y: scroll;
height: 100%;
}
15 changes: 13 additions & 2 deletions jquery.pagepiling.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ===========================================================
* pagepiling.js 1.3
* pagepiling.js 1.4
*
* https://github.com/alvarotrigo/pagePiling.js
* MIT licensed
Expand Down Expand Up @@ -207,7 +207,6 @@
$.isFunction( options.afterRender ) && options.afterRender.call( this);
});


/**
* Enables vertical centering by wrapping the content and the use of table and table-cell
*/
Expand Down Expand Up @@ -614,6 +613,18 @@
}
}

/**
* Return a boolean depending on whether the scrollable element is at the end or at the start of the scrolling
* depending on the given type.
*/
function isScrolled(type, scrollable){
if(type === 'top'){
return !scrollable.scrollTop();
}else if(type === 'bottom'){
return scrollable.scrollTop() + 1 + scrollable.innerHeight() >= scrollable[0].scrollHeight;
}
}

/**
* Determines whether the active section or slide is scrollable through and scrolling bar
*/
Expand Down
30 changes: 15 additions & 15 deletions jquery.pagepiling.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dc69541

Please sign in to comment.