@jonatandor35 It’s because when someone hovers from one menu item to the next it can flash a little gap in between which looks quite bad… would you be able to simply the code, I’m new to coding and that is why it probably looks funny to you.
@welchjoshua818 But if I translate your code into English, this it what it’ll mean:
Once the page got loaded and the $w is ready, wait 300ms and then add an event handler that on mouse-in will immediately collapse the drop-down.
This line means that when the mouse get into the $w(‘#lsbutton’) area it should expand. But if it’s not already expanded, the mouse won’t be able to get over it.
Try to think what you need to achieve, and fix the code in accordance.
@jonatandor35 I did want to stop the dropdown from collapsing immediately because if the other one is not open on time then it looks very wired. All the code is working as it should and doing what I want I just want to know how I could make it so it would improve my site performance.
remove your animations - I found this to be the most dramatic speed increase for my site (I still get 99% with hover animations - just remove the animations that are triggered by the page load)
@welchjoshua818 When I tried your site it loaded pretty fast. Anyway, I don’t think that the code you’re using has any significant effect on the slowness you described. So I can’t give you any smart advice. Maybe someone else.