Hi Greg & gang,
I am wondering what css code to use to make the sub menu items under the main nav items roll down gently as shown in this tutorial: http://candpgeneration.com/toys/CSS3-dropdown-tut.php
I know it’s the transition property and I have played around a bit, but I can’t seem to make it happen.
Thanks in advance!
Make Sub Menus Slide Down Gently
This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.
Hi Barb
The menu is controlled by JavaScript, not CSS. However, you can install a plugin called Header and Footer Scripts, I’m using the one by WPBeginner. Then, in the header field provided by the plugin, insert:
See my two 900 values. Those are 250 by default. You can adjust to slow the transition down further. You can reduce to speed it up.
Plugin I used: https://wordpress.org/plugins/insert-headers-and-footers/
Thanks for the code, Andrew, and for taking the time to research a rather esoteric request!
However, it must be conflicting with some of the existing code in the Vantage’s menu javascript. Take a look at how things roll out now that I’ve added your script (www.barbpetersonwebdesign/art). I tried adjusting the 900 upward and downward, but it never achieved the smooth rolldown as in the tutorial I referenced above.
Not the end of the world if this can’t be achieved but it is a really nice smooth effect and adds a calmness to the navigation process…
Thanks in advance,
~Barb
I can take a quick look if you’d like.
Hi Barb
Would it be possible for you to create a temporary admin account for us so we can log in and take a look? You can create the account with the following email address:
[email protected]
Just navigate to Users > Add New in your WordPress admin. Enter siteorigin for the username and [email protected] for the email address. Make sure you’ve selected Administrator for the role and enabled the “Send Password” field so we receive the details.
Once we’re finished taking a look, you can delete this account. We’ll let you know when to do that.
Thanks, Andrew!
The password should be arriving in your inbox any moment! Your help is much appreciated!!!
Hi Barb
Sorry, doesn’t seem like it arrived. Please, could you send using the Private Reply option bottom right. Thanks :)
This is a private message.
I can see the problem, the transition is happening twice, the second transition is the delayed one. I can’t figure out why I’m not getting the same result on my local demo.
Fixed :) Check now.
The problem was Appearance > Theme Settings > General > Enqueue JavaScript in Footer. For this application we that setting disabled. We need the scripts in the default location, in the document head.
Andrew! You’re a magician! Thanks so much for figuring this out!
Do you think it makes an appreciable site performance difference with all of the JavaScript NOT being enqueued in the the footer?
In other words, now that you have spent all that time helping me with this (and I truly appreciate the time spent), is the effect worth any decrement in site speed?
There will be a small difference. On normal DSL connections it probably isn’t noticeable. Up to you.
Thanks again for your prompt help!
For sure :)