Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $(window).scroll(function(){
- var windowHeight = $(window).scrollTop();
- var nosotros = $("#nosotros").offset();
- var servicio = $("#servicio").offset();
- var header = document.getElementById("navwebalt");
- nosotros = nosotros.top;
- servicio = servicio.top;
- if(windowHeight >= nosotros && windowHeight !== servicio ){
- header.classList.add("sticky");
- }else{
- header.classList.remove("sticky");
- }
- });
- });
Add Comment
Please, Sign In to add comment