Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

scroll for sticky

// window scroll up and add a class for sticky menu
$(window).scroll(function () {
		if ($(this).scrollTop() > 650) {
			$('nav').addClass('sticky');
		} else {
			$('nav').removeClass('sticky');
		}
	});
Comment

PREVIOUS NEXT
Code Example
Javascript :: js get element by innertext 
Javascript :: javascript array flatten 
Javascript :: arrow functions 
Javascript :: Angular empty object 
Javascript :: get text selected 
Javascript :: javascript check if in array 
Javascript :: vue js hooks 
Javascript :: rect to rect collision 
Javascript :: Get Keys Of JSON As Array 
Javascript :: react-floating-whatsapp 
Javascript :: redux toolkit how to set empty initial state 
Javascript :: mongoose filter 
Javascript :: annotation 
Javascript :: how to sho the active navigation ling using javascript 
Javascript :: pop array 
Javascript :: how to get current date in express js 
Javascript :: search a word and separate in javascript 
Javascript :: random function javascript 
Javascript :: combine the values of 2 arrays in key = value jquery 
Javascript :: angular chart js 
Javascript :: what is react 
Javascript :: how to import modules js 
Javascript :: convery array of objects to map using immutables js 
Javascript :: switch react router 
Javascript :: formik validate field array select 
Javascript :: check number javascript 
Javascript :: cypress test only one file 
Javascript :: Activelink.js 
Javascript :: how to check for enter keyPress in react native 
Javascript :: add event listener to all a tags 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =