Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _bottomHeader();
- $(window).on('scroll', function() {
- if ($(this).scrollTop() <= obj.sliderHeight) {
- _bottomHeader();
- } else {
- _topHeader();
- }
- });
- return obj;
- function _bottomHeader() {
- obj.$header.css({
- 'position': 'absolute',
- 'top': obj.sliderHeight
- });
- }
- function _topHeader() {
- obj.$header.css({
- 'position': 'fixed',
- 'top': 0
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement