Skip to content

Commit

Permalink
- Solved bug when clicking on an active navigation bullet and when lo…
Browse files Browse the repository at this point in the history
…ading from an anchor. alvarotrigo#12
  • Loading branch information
alvarotrigo committed Oct 22, 2014
1 parent e797b28 commit e1ee41f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pagePiling.js",
"version": "0.0.5",
"version": "0.0.6",
"homepage": "https://github.com/alvarotrigo/pagePiling.js",
"authors": [
"Alvaro Trigo https://github.com/alvarotrigo"
Expand Down
6 changes: 4 additions & 2 deletions jquery.pagepiling.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ===========================================================
* pagepiling.js 0.0.5 (Beta)
* pagepiling.js 0.0.6 (Beta)
*
* https://github.com/alvarotrigo/pagePiling.js
* MIT licensed
Expand Down Expand Up @@ -240,6 +240,8 @@
leavingSection: $('.pp-section.active').index('.pp-section') + 1
};

//quiting when activeSection is the target element
if(v.activeSection.is(destination)){ return; }

if(typeof v.animated === 'undefined'){
v.animated = true;
Expand Down Expand Up @@ -450,7 +452,6 @@
}else{
var section = $('.pp-section').eq( (sectionAnchor -1) );
}

scrollPage(section);
}
}
Expand Down Expand Up @@ -791,6 +792,7 @@
$(document).on('click touchstart', '#pp-nav a', function(e){
e.preventDefault();
var index = $(this).parent().index();

scrollPage($('.pp-section').eq(index));
});

Expand Down
12 changes: 6 additions & 6 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 e1ee41f

Please sign in to comment.