daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 36 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             $(document).ready(function () {
  2.                 $('#toggle').click(function (e) { $('#floating-topics').toggleClass('open'); });
  3.                
  4.                 window.scrollTop = $(window).scrollTop();
  5.                
  6.                 $(window).scroll(function (e) {
  7.                     var newScroll = $(window).scrollTop();
  8.                     var newPosition = newScroll - scrollTop + 'px';
  9.                     $('#floating-topics').css('top', newPosition);
  10.                 });
  11.             });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top