Skip to content

Commit

Permalink
Attach global reference on window
Browse files Browse the repository at this point in the history
`StickyHeader` reference is lost after minification. Adding it
explicitly to fix minification.
  • Loading branch information
skhilko committed Apr 8, 2015
1 parent 99a6878 commit d529996
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions demo/styles/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ footer {

.list-view-header {
border-bottom: 1px solid hsl(0, 0%, 80%);
background-color: hsl(0, 0, 87%);
background-color: hsl(0, 0%, 87%);
transition: background 300ms;
}

Expand All @@ -76,7 +76,7 @@ footer {

.list-view-item {
border-bottom: 1px solid hsl(0, 0%, 87%);
background-color: hsl(0, 0, 100%);
background-color: hsl(0, 0%, 100%);
}


Expand Down
2 changes: 1 addition & 1 deletion dist/maps/stickyheaders.jquery.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/maps/stickyheaders.min.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/scripts/stickyheaders.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ StickyHeaders.prototype.isWithinHeaderContainer = function(header, scrollTop) {
return header.top >= scrollTop && header.top <= this.headerContainerHeight + scrollTop;
};

window.StickyHeaders = StickyHeaders;

var pluginName = 'stickyHeaders';

function Plugin(element, options) {
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/stickyheaders.jquery.min.js

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

2 changes: 2 additions & 0 deletions dist/scripts/stickyheaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,6 @@ StickyHeaders.prototype.onHeaderScroll = function(ev) {
StickyHeaders.prototype.isWithinHeaderContainer = function(header, scrollTop) {
return header.top >= scrollTop && header.top <= this.headerContainerHeight + scrollTop;
};

window.StickyHeaders = StickyHeaders;
})(window, window.document);
2 changes: 1 addition & 1 deletion dist/scripts/stickyheaders.min.js

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

2 changes: 2 additions & 0 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,5 @@ StickyHeaders.prototype.onHeaderScroll = function(ev) {
StickyHeaders.prototype.isWithinHeaderContainer = function(header, scrollTop) {
return header.top >= scrollTop && header.top <= this.headerContainerHeight + scrollTop;
};

window.StickyHeaders = StickyHeaders;

0 comments on commit d529996

Please sign in to comment.