Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #485791

    Hi I have an unusual question.

    Client wants the tabs I added to his page Change the content on mouse-over. It obviously would only be for desktop as hover does not work on mobile. Can you help me with this?

    • This topic was modified 8 years, 10 months ago by Diezel23.

    Hi Gavin!

    Try changing line 2605 in the /enfold/js/shortcodes.js file from this.

    tab.addClass('tab_counter_'+i).bind('click', function()

    To this.

    tab.addClass('tab_counter_'+i).bind('onmouseover', function()

    Best regards,


    Hi Elliot

    Not sure if it will pick it automatically or not. I have a child theme and copied the js folder and shortcodes.js to the child theme. i’ve made the alterations as you suggested but to no avail. Am i suppose to reference the shortcode.js from the functions.php or not.



    Please add following code to Functions.php file of your child theme

    function wp_change_shortcodejs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 2, true );
    add_action( 'wp_print_scripts', 'wp_change_shortcodejs', 100 );

    and move modified file inside /js folder


    Hi Yigit

    Yeah done that but still does not work



    Why do you use – add_action( ‘wp_print_scripts’, ‘wp_change_shortcodejs’, 100 );
    and not – add_action( ‘wp_enqueue_scripts’, ‘wp_change_shortcodejs’ );

    your option did not load the shortcodes the second one did….

    • This reply was modified 8 years, 10 months ago by Diezel23.


    So, is the issue fixed now? Please let us know…

    Best regards,


    Nope is still does not work



    Sorry, it looks like they changed the handler in later versions of jQuery. Try this instead.

    tab.addClass('tab_counter_'+i).bind('mouseenter', function()



    tab.addClass('tab_counter_'+i).bind('mouseenter', function()
    This does not work.
    Sorry! I forgot to clear the cache.

    • This reply was modified 7 years, 11 months ago by zhitya.


    Glad you got it working :-)

    Please open a new thread if you should have any further questions or problems.

    Best regards,

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Change Tab click event to hover on desktop’ is closed to new replies.