Adding slider_settings.js to child theme too
This commit is contained in:
parent
e13d62120b
commit
44fee3311e
|
@ -14,4 +14,4 @@ add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
|
|||
function theme_enqueue_styles() {
|
||||
wp_enqueue_style( 'child-understrap-styles', get_stylesheet_directory_uri() . '/css/child-theme.min.css', array());
|
||||
wp_enqueue_script( 'child-understrap-scripts', get_stylesheet_directory_uri() . '/js/child-theme.min.js', array(), '0.1.0', true );
|
||||
}
|
||||
}
|
||||
|
|
24
js/slider_settings.js
Normal file
24
js/slider_settings.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
jQuery(document).ready(function() {
|
||||
var owl = jQuery('.owl-carousel');
|
||||
owl.owlCarousel({
|
||||
items:(understrap_slider_variables.items),
|
||||
loop:true,
|
||||
autoplay:true,
|
||||
autoplayTimeout:(understrap_slider_variables.timeout),
|
||||
animateOut: 'fadeOut',
|
||||
animateIn: 'fadeIn',
|
||||
nav: false,
|
||||
dots: true,
|
||||
autoplayHoverPause:true,
|
||||
margin:0,
|
||||
autoHeight:true
|
||||
});
|
||||
|
||||
jQuery('.play').on('click',function(){
|
||||
owl.trigger('autoplay.play.owl',[1000])
|
||||
});
|
||||
jQuery('.stop').on('click',function(){
|
||||
owl.trigger('autoplay.stop.owl')
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue