- This topic has 20 replies, 4 voices, and was last updated 6 years, 3 months ago by Tom.
-
AuthorPosts
-
January 20, 2015 at 12:04 am #66917Webmaster
I would like to make my primary nav instantly appear. I notice the superfish.js file, but I believe generatepress/js/scripts.js will be used instead. What do I need to change to get results?
I found this post on the forums, but I wasn’t able to find the results.
jQuery(document).ready(function($) { $('.main-nav > ul').superfish({ delay: 0, // one second delay on mouseout animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation disableHI: true, speed: 'fast' // faster animation speed }); });
Also, could I copy / paste code snippet to my child’s function.php file to prevent losing data on Theme upgrade?
January 20, 2015 at 4:11 pm #67153TomLead DeveloperLead DeveloperHi there,
This code should work:
add_action( 'wp_print_scripts', 'generate_remove_superfish', 100 ); function generate_remove_superfish() { wp_dequeue_script( 'superfish' ); wp_dequeue_script( 'hoverIntent' ); wp_dequeue_script( 'scripts' ); }
However, I just submitted GP 1.2.5 to WP.org, and I just found a mobile menu bug when Superfish is disabled.
I’ve fixed the bug, but will wait to release 1.2.6 until I have a few more things done.
If you want to email me at support@generatepress.com I can give you the bug fix, which will only be necessary while running 1.2.5.
Let me know 🙂
January 20, 2015 at 4:16 pm #67155WebmasterThanks brothaman!
I’ll go ahead an add that snippet to my child functions.php
January 21, 2015 at 12:11 am #67265TomLead DeveloperLead DeveloperYou’re welcome 🙂
June 22, 2015 at 10:20 pm #116133WebmasterHey Tom,
What alternative method may I disable the animation from navigation? I’m using this theme on a WPMU and the subsite doesn’t give access to the functions.php.
June 22, 2015 at 11:44 pm #116136TomLead DeveloperLead DeveloperHmm tough one, the transition is using javascript, so we can’t even overwrite it with custom CSS.
The only way would be to dequeue superfish using a function – there’s no way for you to add PHP? Even using a plugin like Code Snippets?
June 24, 2015 at 7:37 am #116370WebmasterThat’ll work – thanks!
June 24, 2015 at 10:27 am #116394TomLead DeveloperLead DeveloperDo you have the code to dequeue it, or do you need it? 🙂
June 24, 2015 at 2:43 pm #116424WebmasterMay you please share code? Thanks in advance.
June 24, 2015 at 10:43 pm #116456TomLead DeveloperLead DeveloperTry adding this to the wp_footer hook:
<script> jQuery(document).ready(function() { jQuery('ul.sf-menu').superfish('destroy'); jQuery('ul.sf-menu').superfish({ delay : 0, disableHI : true, animation : { opacity: 'show' }, speed : 1 }); }); </script>
December 15, 2016 at 7:02 pm #255267MarceloHi Tom, This do not work now, i need the same solution.
December 15, 2016 at 8:34 pm #255269TomLead DeveloperLead DeveloperThis should do it: https://generatepress.com/forums/topic/hover-time-dropdown/#post-219409
December 16, 2016 at 8:09 am #255416MarceloTom don´t work this other code neither.
December 16, 2016 at 9:08 am #255439LeoStaffCustomer SupportTry adding this CSS with the code Tom provided above:
.sfHover > .sub-menu { opacity: 1 !important; }
December 16, 2016 at 10:24 am #255458MarceloI want to change the menu speed not the opacity. I think that is an jQuery code.
-
AuthorPosts
- You must be logged in to reply to this topic.