Skip to content

Commit 5848085

Browse files
committed
- Adding some comments
1 parent 74cd65d commit 5848085

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

jquery.fullPage.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,9 @@
916916
$.isFunction( options.afterRender ) && options.afterRender.call(container);
917917
}
918918

919+
/**
920+
* Determines if the URL anchor destiny is the starting section (the one using 'active' class before initialization)
921+
*/
919922
function isDestinyTheStartingSection(){
920923
var anchors = window.location.hash.replace('#', '').split('/');
921924
var destinationSection = getSectionByAnchor(decodeURIComponent(anchors[0]));
@@ -1028,13 +1031,16 @@
10281031
}
10291032
}
10301033

1034+
/**
1035+
* Fits the site to the nearest active section
1036+
*/
10311037
function fitToSection(){
10321038
//checking fitToSection again in case it was set to false before the timeout delay
10331039
if(canScroll){
10341040
//allows to scroll to an active section and
10351041
//if the section is already active, we prevent firing callbacks
10361042
isResizing = true;
1037-
1043+
10381044
scrollPage($(SECTION_ACTIVE_SEL));
10391045
isResizing = false;
10401046
}
@@ -2290,7 +2296,6 @@
22902296
function getSectionByAnchor(sectionAnchor){
22912297
if(!sectionAnchor) return [];
22922298

2293-
//section
22942299
var section = container.find(SECTION_SEL + '[data-anchor="'+sectionAnchor+'"]');
22952300
if(!section.length){
22962301
section = $(SECTION_SEL).eq( sectionAnchor -1);

0 commit comments

Comments
 (0)