Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1307023

    Dear Kriesi/Enfold Support Team,

    I would like to show all unordered list elements below my header’s menu at once when a user mouses over it. More precisely, I want to change my .sub-menu ul-s’ opacity to 1 and visibility to ‘visible’ when a user mouses over the header div (.avia-menu .av-main-nav-wrap).

    In theory, I understand how to do this with jquery/javascript, but where can I add this bit of code in the Theme Editor? Or what’s the best approach to implement what I am seeking to do?

    Many thanks in advance,
    Fabian

    #1307411

    Hey fabian_stricker,

    Thank you for the inquiry.

    You can create an external js script and register using the wp_enqueue_script function, or add an inline script using the wp_add_inline_script function. You can also use the wp_head or wp_footer to insert script inside the head tag or before the closing body tag. Whichever way you choose should be fine.

    inline script: https://developer.wordpress.org/reference/functions/wp_add_inline_script/
    external js: https://developer.wordpress.org/reference/functions/wp_enqueue_script/

    You can also add the script directly in the template files but we recommended doing one of the above methods.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.