-
AuthorPosts
-
September 15, 2017 at 1:38 am #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 7 years, 2 months ago by blaircomm.
September 19, 2017 at 3:26 am #853649Hey blaircomm,
Thank you for using Enfold.
We provided a solution here.
// https://kriesi.at/support/topic/accordion-slider-customization-2/#post-853645
Best regards,
IsmaelSeptember 19, 2017 at 4:41 am #853665This 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.
September 19, 2017 at 5:01 am #853667Now 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.
September 20, 2017 at 5:49 am #854153Hi,
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,
IsmaelSeptember 20, 2017 at 6:03 pm #854516It 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.
September 22, 2017 at 7:34 am #855200Hi,
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,
IsmaelSeptember 22, 2017 at 6:30 pm #855492I 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.
September 23, 2017 at 3:40 am #855669 -
AuthorPosts
- You must be logged in to reply to this topic.