Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A a11yproject.com
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The A11Y Project
  • a11yproject.com
  • Merge requests
  • !327
An error occurred while fetching the assigned milestone of the selected merge_request.

#320 - add lazyload to footer

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/joe-watkins/feature/lazyLoadFooter into gh-pages 10 years ago
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: joe-watkins

Adding lazy load functionality to footer. Subsequent loads the footer is drawn from local storage. Anybody wanna take a peek?

Compare
  • gh-pages (base)

and
  • latest version
    41e78f59
    1 commit, 2 years ago

1 file
+ 29
- 1

    Preferences

    File browser
    Compare changes
js/scripts.js
+ 29
- 1
  • View file @ 41e78f59


@@ -14,7 +14,35 @@ $(document).ready(function(){
ui : {
lazyLoadFooter : function(target,offset){
var $target = $(target),
targetLoc = $target.offset().top,
footerLazyLoadTriggered = false;
if(!footerLazyLoadTriggered){
$(window).scroll(function(e){
var scrollPos = $(this).scrollTop(),
offSet = offset,
targetScroll = targetLoc - offSet;
if(targetScroll <= scrollPos && !footerLazyLoadTriggered){
Engine.ui.footerContributors(); // run custom footer
footerLazyLoadTriggered = true;
}
});
}else{
Engine.ui.footerContributors(); // run custom footer
}
}, // lazyLoadFooter()
footerContributors : function(){
function gitHubContributors(){
var
@@ -260,7 +288,7 @@ $(document).ready(function(){
} // Engine
Engine.ui.footerContributors();
Engine.ui.lazyLoadFooter("footer[role='contentinfo']",800);
Engine.ui.footerCopyright();
Engine.ui.toc();
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference:
Source branch: github/fork/joe-watkins/feature/lazyLoadFooter

Menu

Explore Projects Groups Snippets