K
K
Konstantin2020-07-22 21:10:33
JavaScript
Konstantin, 2020-07-22 21:10:33

How to control the visibility of a slide if it is stored in the cache?

I have a script in wp that turns off the visibility of the slide, it looks like this:

5f1880944148f683887029.png

The slide turns off exactly for a second, but then appears again, since the slick slider regenerates it (probably from the cache), is it possible to turn it off in the cache somehow?

The code that is responsible for hiding:

// чекер для слайдера

  wp.customize( 'settings_checker_slide1', function( value ) {
    value.bind( function( newVal ) {
      false === newVal ? $( '#slick-slide00' ).hide() : $( '#slick-slide00' ).show();
    } );
  });

The checker is working, static blocks are turned off with a bang, but the trouble is with the slide.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question