-
AuthorPosts
-
May 28, 2014 at 7:40 pm #271385
I have the fullscreen slider on my home page. Any time I use the arrows to move to the next slide or use a swipe gesture on a mobile device the auto rotation of the slideshow stops. How do I disable this?
May 29, 2014 at 8:08 am #271664Hey kevinjsutton!
Open up wp-content/themes/enfold/js/shortcodes.js and replace:
// public method: shows next image next : function(e) { e.preventDefault(); this._stopSlideshow(); this._navigate( 'next' ); }, // public method: shows previous image previous : function(e) { e.preventDefault(); this._stopSlideshow(); this._navigate( 'prev' ); },
with
// public method: shows next image next : function(e) { e.preventDefault(); this._stopSlideshow(); this._navigate( 'next' ); this.options.autoplay = true; this._startSlideshow(); }, // public method: shows previous image previous : function(e) { e.preventDefault(); this._stopSlideshow(); this._navigate( 'prev' ); this.options.autoplay = true; this._startSlideshow(); },
Regards,
PeterMay 29, 2014 at 6:44 pm #271908This reply has been marked as private.May 30, 2014 at 7:43 am #272266Hey!
Yes, I forgot to set the “autoplay” variable to true. I corrected the code here: https://kriesi.at/support/topic/fullscreen-slider-pause-issue/#post-271664
If you want to overwrite the default (parent theme) shortcode.js file with your child theme copy the shortcode.js file from the parent theme folder into the js folder of your child theme (i.e. the path looks like wp-content/themes/enfold-child/js/shortcodes.js) and add this code to the child theme functions.php file:
if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 1); function avia_register_child_frontend_scripts() { $child_theme_url = get_stylesheet_directory_uri(); wp_dequeue_script('avia-shortcodes'); wp_enqueue_script( 'avia-shortcodes', $child_theme_url .'/js/shortcodes.js', array('jquery'), 1, true ); }
Cheers!
PeterMay 30, 2014 at 8:14 am #272276This reply has been marked as private.May 30, 2014 at 8:17 am #272278Hey!
Yes exactly – you need to add the code ( https://kriesi.at/support/topic/fullscreen-slider-pause-issue/#post-272276 ) to your child theme functions.php – otherwise the child theme won’t load the modified shortcodes.js file.
Cheers!
PeterMay 30, 2014 at 8:27 am #272283Worked like a charm. Thanks very much for your help!
-
AuthorPosts
- The topic ‘Fullscreen Slider Pause Issue’ is closed to new replies.