Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sidebar_share_sticky() {
- var top = 20;
- var cachetop = top;
- var navbar = $('.jeg_navbar_wrapper');
- var ww = $(window).width();
- var do_sticky = function() {
- var st = $(window).scrollTop();
- // is navbar sticky
- if(st == 0) {
- if(navbar.position().top === 0) {
- if ( st > navbar.outerHeight()) {
- top = 70;
- }
- }
- }
- if(ww >= 767 && cachetop !== top)
- {
- $('.jeg_sticky_sidebar').addClass('normalize-top');
- $('.share-float').addClass('normalize-top');
- }
- };
- $(window).bind('scroll', do_sticky);
- $(window).bind('resize', function(){
- ww = $(window).width();
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement