• Resolved verim

    (@verim)


    I have a question, I created a widget here a little snippet.

    $slides_to_show = range( 1, 3 );

    $this->add_responsive_control(
    ‘slides_to_show’,
    [
    ‘label’ => __( ‘Slides to Show’, ‘elementor’ ),
    ‘type’ => Controls_Manager::SELECT,
    ‘options’ => [
    ” => __( ‘Default’, ‘elementor’ ),
    ] + $slides_to_show,
    ‘frontend_available’ => true,
    ]
    );
    I would like to use the $slides_to_show variable in my javascript code like this.
    $(‘.owl-screenshot’).owlCarousel({
    loop:true,
    responsive:{
    1000:{
    items:$slides_to_show
    }
    }
    })
    How is it possible to use the $slides_to_show in my js file? Can’t find a solution hopefully you can give me a tip.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Issue with javascript’ is closed to new replies.