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

    In another thread, https://kriesi.at/support/topic/accordion-slider-customization-2/#post-851765, the user was trying to edit accordion slider code so first slide is instantly opened when slider is loaded. It seemed to go nowhere and he refused to grant moderator Victoria admin access.

    I want to do this as well and t seems it should be possible to customize the behavior a bit on the accordian slider. So, to see if this can be accomplished, I have included an admin access in private content—and the page link where the accordian slider is.

    Please, have a look and let me know if you think it can be done. And any code nesessary.

    Thanks

    — Michael

    • This topic was modified 6 years, 7 months ago by blaircomm.
    #853649

    Hey blaircomm,

    Thank you for using Enfold.

    We provided a solution here.

    // https://kriesi.at/support/topic/accordion-slider-customization-2/#post-853645

    Best regards,
    Ismael

    #853665

    This is a nice piece of code, thanks. I changed it so it opens at the first slide.

    // custom script
    function add_custom_script(){
    ?>
    <script>
    (function($){
    setTimeout(function() {
    $(“.aviaccordion-slide-1”).trigger(‘mouseenter’);
    }, 1000);
    })(jQuery);
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_script’);

    However, it does not resume the normal autorotation of the accordian slider after an interval. And, eventually it opens and closes slides 2 and 3, and sometimes 4 in random order and for random durations—sometimes. In other words, it seems to affect the autorotate so it does not work and affects some slides randomly so they open and close. The “mouseenter” does work fine to manually rotate the slides.

    Is thre any way to run the script as you have it leaving the fist slide open for a certain interval, say 10 seconds, and then put that script to sleep and rectivate the built-in auto-rotate script so the autorotation again works?

    Ideally, the first slide would load in an open position, hold that way for 10-seconds, then the autorotation would resume normally with the interval set in the accordian slider control settings.

    Let me know.

    Thanks for the help.

    #853667

    Now the script doesn’t work. After clearing everything, closing and reboting the browser—it does not load with the first slide open. However, if I refresh the screen it does on the second load. So the script isn’t working as it should.

    I tried it in the functions.php file and it does not work at all. I am using a plugin, Snippets, where it is now active. This plugin has worked flawlesly for me on many sites incliding complex ecommerce integrations.

    If you can have a look to see if it is an easy fix that would be great. See my admin login info above.

    Thanks.

    #854153

    Hi,

    Where did you add the code? I can’t find it in the functions.php file. Please note that the script will be disabled if the user put the mouse over the accordion slider.

    Best regards,
    Ismael

    #854516

    It is in the “Snippits” interface, a plugin for adding code outside the theme functions file—so it will not be overwritten with updates. Please see the “Snippits” menu in the left sidebar underneath “Plugins.” CLick “All snippits” and then edit the only one you will see.

    Thanks.

    #855200

    Hi,

    I see. Is it working if you add it in the functions.php file? It worked for the other user. Please move to a child theme.

    // http://kriesi.at/documentation/enfold/using-a-child-theme/

    Best regards,
    Ismael

    #855492

    I tried it in the functions.php file and it does not work at all. I will set it up as a child theme, and vet all the plugins to see if there is a conflict.

    Thanks.

    #855669

    Hi,

    Alright. Let us know if it’s not working.

    Best regards,
    Ismael

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