Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #942172

    hi

    i have accordions on the homepage. i want to make the accordions expand on hover instead of click.

    I saw that people have asked this question in the past, and you said to change some code. however, i am not comfortable or experienced enough to play around with code…

    can you please do it for me? please note that i am using a child theme and wouldn’t want the changes to be lost with an update…

    thanks for your help.

    #942176

    What did you do on touchscreens ?

    #942177

    you can only open the read more when you click and i want it to open when you hover over the read more

    can you please do it for me?

    #942382

    Hi,
    I edited this file in the enfold theme folder: js/shortcodes.js and found this code:

    thisheading.on('click', function()

    and replace it with this code:

    thisheading.on('mouseover', function()

    Then I copied the modified shortcodes.js to your_child_theme_folder/js/shortcodes.js and added this at the very end of your child theme functions.php file:

    function change_aviajs() {
       wp_dequeue_script( 'avia-shortcodes' );
       wp_enqueue_script( 'avia-shortcodes-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 3, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );

    This is working on my localhost after a hard cache flush, yet clearing your cache several times has not helped. I don’t see a cache plugin on your site. So please look on your webhost for any host level caching that you can clear, or ask your host if they can assist.

    Best regards,
    Mike

    #942489

    Hi,
    I’m happy to report that since a few hours have pasted, the edited shortcodes.js in the child theme is working as expected.
    Is there anything else we can assist with on this, or shall we close this?

    Best regards,
    Mike

    #945758

    thanks for doing it.
    at the moment the accordion expands when hovering and then stays open even when not hovering. i have to hover over it again in order to close it.

    is it possible to make it expand when you hover, but it should close automatically when i move the mouse away from the element?

    thanks

    #946338

    Hi,

    Unfortunately this is the intended behavior, normally you have to click to open & click to close. We have only replaced the click action for mouseover, but there is nothing in place to have a default no action presence. If there was there is a good chance it would interfere with the normal actions.
    You can request customization here, as this kind of customization as it is beyond the scope of support we can provide here.

    Best regards,
    Mike

    #946530

    thanks.

    at the moment, the accordion is very jumpy and it’s annoying.
    please change it back to expanding by clicking. i am sorry for driving you crazy but it cannot stay the way it is.

    thanks

    #946546

    Hi,
    OK, I removed the use of the child theme shortcodes.js from your child theme functions.php
    Please clear your browser cache and check.

    Best regards,
    Mike

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