'scroll to section(id #one) add active class class jquery
here is my jQuery Code and here is my web page url: https://ipconsultingfirm.com/home/
jQuery(window).scroll(function(){
if(jQuery(window).scrollTop() >= jQuery("#one").offset().top + jQuery("#one").height() || jQuery(window).scrollTop() < jQuery("#one").offset().top){
jQuery('#one').removeClass('active');
}
else{
jQuery('#one').addClass('active');
}
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
