i have a one page website with smooth scrolling effect when an a tag (navigation) is clicked, one of those navigation entry also calls a hidden div(input.box) with fadeIN function, my problem is whenever that entry with fadeIN function shows, the page also slides down a little bit. How should i restrict this menu with fadein function from scrolling also? I have the codes i used for smoothscroll and fadein on my jsfiddle bellow.
i have a one page website with smooth scrolling effect when an a tag
Share
The following part of your smooth scroll code selects the elements for which to apply the effect:
You need to restrict that to exclude the anchor that opens the popup. The approach to doing this depends on how you identify the element to exclude:
or
One could also argue that it would be neater if the criteria was the other way around, so that the elements that should be targeted for smooth scrolling needs to be actively selected, rather than filtered out: