Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).scroll(function() {
- if($('#wpadminbar').length) {
- var ht = 101;
- } else {
- var ht = 133;
- }
- if($(window).scrollTop() > ht) {
- var css = {
- position : 'fixed',
- top : -ht + 'px',
- right : 0,
- width : '100%',
- 'z-index' : 9999
- };
- $('body > header').css(css);
- } else {
- $('body > header').css('position', 'static');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement