V
V
Vladimir2022-01-18 16:15:30
Slider
Vladimir, 2022-01-18 16:15:30

Why is the WordPress bootstrap slider not working on my computer?

Faced a problem. Added a layout template on WP to hosting roflanhost.beget.tech
Connected styles, scripts

<?php 
// правильный способ подключить стили и скрипты 
add_action( 'wp_enqueue_scripts', 'cafeesa_add_scripts' );
function cafeesa_add_scripts() {
  // подключаем файл стилей темы
  wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css' );
  wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css' );
  wp_enqueue_style( 'style-main', get_template_directory_uri() . '/css/style.css' );
  wp_enqueue_style( 'responsive', get_template_directory_uri() . '/css/responsive.css' );
  wp_enqueue_style( 'style', get_stylesheet_uri() );
// подключаем js файл темы
wp_deregister_script( 'jquery-core' );
wp_register_script( 'jquery-core', get_template_directory_uri() . '/js/jquery-3.4.1.min.js');
wp_enqueue_script( 'jquery' );

wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '1.0', true );
wp_enqueue_script( 'custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0', true );

}

add_theme_support( 'title-tag' );


And the slider does not work, when I logged in from the phone, everything works there. (everything is ok for one friend from the computer, it doesn’t work for the other either)
In the inspector I checked, when you press the arrow, the supposedly classes change. But nothing moves.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2022-01-18
@faradeifrontend

Solved changed transition:none to 1s
media (prefers-reduced-motion: reduce) {
.carousel-item {
transition: 1s;
}
}
It's strange why it then worked on the phone and other computers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question