So I was adding some animations to the navbar dropdowns, but for some reason the most accepted answer (Adding a slide effect to bootstrap dropdown) seems to break or become
It's difficult without being able to inspect the elements but I have a hunch that your problem may lie with the container with the class "drowpdown-menu" (or whichever element actually has the scroll bar attached to it if it's not dropdown-menu). I don't think there's a problem with your jQuery but I would try adding a style to control the overflow property. Try setting it to hidden to force the box to go outside the bounds of the page. The main scroll should handle it from there. However from a UX point of view I would caution you on creating a menu with a lot of nesting which can result in a poor experience to the end user.
$(document).ready(function(){
$(".class-name").click(function(){
$(".class-name").slideToggle(1000);//hear you can change value of slidetoggle i.e "slow","fast", or any number
});
});