Fix agency collection slider

This commit is contained in:
Hoang Huu 2020-02-29 15:27:21 +07:00
parent 8ef01f3c21
commit e5991913ed
3 changed files with 8 additions and 5 deletions

View File

@ -60,7 +60,6 @@
// $carousel.addClass('products');
}
/// // / / / /
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addAction( 'frontend/element_ready/opalestate-agent-collection.default', function( $scope ) {
@ -69,6 +68,12 @@
}
} );
elementorFrontend.hooks.addAction( 'frontend/element_ready/opalestate-agency-collection.default', function( $scope ) {
if( $scope.find(".elementor-opal-slick-slider") ) {
carouselSlick( $scope, '.elementor-slick-slider-row.row-items', elementorFrontend );
}
} );
elementorFrontend.hooks.addAction( 'frontend/element_ready/opalestate-property-collection.default', function( $scope ) {
if( $scope.find(".elementor-opal-slick-slider") ) {
carouselSlick( $scope, '.elementor-slick-slider-row.row-items' , elementorFrontend );
@ -80,7 +85,5 @@
carouselSlick( $scope, '.elementor-slick-slider-row.row-items' , elementorFrontend );
}
} );
});
})( jQuery );

View File

@ -168,7 +168,7 @@ class Opalestate_Agency_Collection_Elementor_Widget extends Opalestate_Elementor
$this->add_control(
'enable_carousel',
[
'label' => esc_html__( 'Enable', 'opalestate-pro' ),
'label' => esc_html__( 'Enable Carousel', 'opalestate-pro' ),
'type' => Controls_Manager::SWITCHER,
]
);

View File

@ -168,7 +168,7 @@ class Opalestate_Agent_Collection_Elementor_Widget extends Opalestate_Elementor_
$this->add_control(
'enable_carousel',
[
'label' => esc_html__( 'Enable', 'opalestate-pro' ),
'label' => esc_html__( 'Enable Carousel', 'opalestate-pro' ),
'type' => Controls_Manager::SWITCHER,
]
);