Similiarly to some users using other themes, I’ve found the slider will not START sliding on its own, but will slide continually if you click on one of the other articles to get it going. Is there a way to get it to start sliding on its own? That would be much nicer.
In addition, is there any way to allow the slides to swipe for mobile devices?
Thanks!
Hi Jerry,
– To make the slider autoplay, please go to Dashboard / Appearances / Customize / Custom Code, and add the code below to Footer Code section:
<script id="auto_play_slider">
jQuery(function($){
$('.dw-simplex-slide').carousel({
interval: 3000
});
});
</script>
– To allow the slides to swipe for mobile devices, you can follow the steps here:
1) Download the jquery touchwipe file in the link here: http://www.netcu.de/templates/netcu/js/jquery.touchwipe.min.js
After that, copy the file to themes/dw-simplex/assets/js folder.
2) Open up the functions.php file in themes/dw-simplex folder, find the code below (around line 73):
wp_enqueue_script('dw_simplex_script',get_template_directory_uri().'/assets/js/script.js', array('jquery'));
and change it into this:
wp_enqueue_script('dw_simplex_script',get_template_directory_uri().'/assets/js/script.js', array('jquery'));
wp_enqueue_script('dw_simplex_mobile',get_template_directory_uri().'/assets/js/jquery.touchwipe.min.js', array('jquery'));
3) Go to Dashboard / Appearances / Customize / Custom Code, and add the following code to Footer Code section:
<script id="swipe_slider">
jQuery(document).ready(function() {
jQuery('.dw-simplex-slide').touchwipe({
wipeLeft: function() { jQuery('.dw-simplex-slide').carousel('next'); },
wipeRight: function() { jQuery('.dw-simplex-slide').carousel('prev'); },
min_move_x: 20,
preventDefaultEvents: false
});
});
</script>
Hope this helps!
Thanks! It works! 🙂
Please login or Register to submit your answer