-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert sticky-element.js to use the Module pattern
What Currently, the sticky-element in Government Frontend does not follow the JavaScript module pattern. Convert the existing code to be consistent with this pattern. Why? The module pattern is the standard approach and this JavaScript component does not follow the convention. A note on the tests The tests for sticky-element do not actually test physical scrolling on the page. Instead they test for presence of specific CSS classes. Because of this it was found necessary to run the checkResize() and checkScroll() methods prior to expecting these classes to have changed. In effect this simulates physically scrolling or resizing the page.
- Loading branch information
Showing
2 changed files
with
154 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters