×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Marosi Dóra
Added: Aug 24, 2017 9:45 AM
Views: 0
Tags: no tags
  1. $(window).bind('scroll', function () {
  2.     if ($(window).scrollTop() > 150) {                        
  3.         $('header').addClass('fixed');
  4.     } else {
  5.         $('header').removeClass('fixed');
  6.     }
  7. });