- This topic has 7 replies, 4 voices, and was last updated 7 years, 1 month ago by carlo.cocco.
- AuthorPosts
- June 18, 2017 at 2:22 am #3103MatiasPParticipant
Hi, I’d appreciate if someone could tell me how I can delay the image swapping in the slider. I don’t mind modifying files. Thank you.
June 18, 2017 at 8:56 am #3109HashKeymasterYou need to modify the total-custom.js file in the line number 26 in the below reference link.
Just increase the value of 5000 https://themes.trac.wordpress.org/browser/total/1.1.6.5/js/total-custom.jsJune 18, 2017 at 6:29 pm #3111MatiasPParticipantIt works! Thank you!
June 20, 2017 at 1:18 am #3118jrotellaParticipantIs there a way of doing this in the Additional CSS rather than modifying files?
June 21, 2017 at 5:39 pm #3119MatiasPParticipantI doubt it.
July 14, 2017 at 11:11 pm #3185November 3, 2017 at 4:19 pm #3853carlo.coccoParticipantHi, the same thing can be done with a custom js file added in a chid theme?
Thank you.November 3, 2017 at 4:56 pm #3854carlo.coccoParticipantHi, I solved.
I create a new js file under total-child/js/ called total-child.js, containing the following js code to increase slider duration to 10 seconds:
jQuery(function($){ if($('#ht-bx-slider .ht-slide').length > 0){ var owl = $('#ht-bx-slider'); owl.owlCarousel({ autoplay : true, items : 1, loop : true, nav: true, dots : false, autoplayTimeout: 10000, //autoplayHoverPause:true, animateOut: 'fadeOut' }); owl.trigger('play.owl.autoplay',[1000]); } });
Then, in my child theme functions.php file, I added the following instruction:
function total_child_scripts() { wp_enqueue_script( 'total-child-custom', get_stylesheet_directory_uri() . '/js/total-child-custom.js', array('jquery'), null, true ); } add_action( 'wp_enqueue_scripts', 'total_child_scripts', 10 );
Maybe can be helpful.
Regards!
- AuthorPosts
- You must be logged in to reply to this topic.