Форум программистов, компьютерный форум, киберфорум
HTML, CSS
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 5.00/4: Рейтинг темы: голосов - 4, средняя оценка - 5.00
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
1

Не работает слайдер на некоторых страницах

19.08.2019, 09:02. Показов 671. Ответов 17
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Сделал слайдер и поместил его в отдельный файл heder.html
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<div class="container-fluid">
        <div class="row header">
            <div id="carouselExampleIndicators" class="carousel slide col-xl-12" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
                    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
                    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
                </ol>
                <div class="carousel-inner">
                    <div class="carousel-item active sl-1">                     
                    </div>                      
                    <div class="carousel-item sl-2">
                    </div>
                    <div class="carousel-item sl-3">
                    </div>                  
                </div>
            </div>
</div>
</div>
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.container-fluid{
    padding: 0px!important;
    margin: 0px!important;
}
.header{
    background: #1D1D1B;
    width: 100%;
    padding: 0px!important;
    margin: 0px!important;
}
.carousel-inner {
    height: 100vh;
    width: 100%;
}
.carousel-item{
    height: 100%;
    width: 100%;
    display:table;
}
.slide{
    padding: 0px;
    margin: 0px;
}
.sl-1{
    background: url("/images/service/SLIDE-1.jpg") no-repeat  center fixed;
    background-size: cover;
    padding: 0px;
    margin: 0px;
}
.sl-2{
    background: url("/images/service/SLIDE-3.jpg") no-repeat  center fixed;
    background-size: cover;
    padding: 0px;
    margin: 0px;
}
.sl-3{
    background: url("/images/service/SLIDE-4.jpg") no-repeat  center fixed;
    background-size: cover;
    padding: 0px;
    margin: 0px;
}
Этот файл подключаю к страница на которых должен отображаться слайдер следующим образом
PHP
1
2
3
            <?php
    include ($_SERVER['DOCUMENT_ROOT'] ."/header.html");
?>
Возникают две проблемы :
  1. Слайдер работает только на главной странице сайта, на остальных не срабатывают переходы между слайдами
  2. Иногда происходит увеличение картинки (типо эффекта zoom в раз 10 наверное)
с чем это может быть связано. куда копать
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
19.08.2019, 09:02
Ответы с готовыми решениями:

Не работает слайдер на других страницах
Здравствуйте, помогите, если не сложно, разобраться в чем проблема? Слайдер работает лишь на...

Не работает скроллинг в Webbrowser на некоторых страницах
Добрый день! Столкнулся с проблемой, что программный скроллинг страницы загруженной в Webbrowser...

Социалка на некоторых страницах
На одном сайте, на некоторых новых страницах вместо объявлений начинает показываться социальная...

Не подгружается css на некоторых страницах
Делаю сайт на вордпресе (свой шаблон) на 3х языках - Укр/Eng/Рус . В хроме и опере все работает. В...

17
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 10:39 2
Цитата Сообщение от yura0103 Посмотреть сообщение
Слайдер работает только на главной странице сайта
тоже include'ом подключён? Как переходы по страница осуществляются?
Кстати, а как слайды переключаются? Не увидел в css анимации или слепой...
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 11:15  [ТС] 3
Цитата Сообщение от atanov Посмотреть сообщение
тоже include'ом подключён?
Да. include'ом
Это я немного изменил стандартный слайдер bootstrap
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 11:21 4
Цитата Сообщение от yura0103 Посмотреть сообщение
Это я немного изменил стандартный слайдер bootstrap
и где он?
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 11:46  [ТС] 5
Верста слайдера выше, а функционал стандартный js
Javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
/**
 * --------------------------------------------------------------------------
 * Bootstrap (v4.0.0): carousel.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */
 
var Carousel = function ($$$1) {
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */
  var NAME = 'carousel';
  var VERSION = '4.0.0';
  var DATA_KEY = 'bs.carousel';
  var EVENT_KEY = "." + DATA_KEY;
  var DATA_API_KEY = '.data-api';
  var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
  var TRANSITION_DURATION = 600;
  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
 
  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
 
  var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
 
  var Default = {
    interval: 5000,
    keyboard: true,
    slide: false,
    pause: 'hover',
    wrap: true
  };
  var DefaultType = {
    interval: '(number|boolean)',
    keyboard: 'boolean',
    slide: '(boolean|string)',
    pause: '(string|boolean)',
    wrap: 'boolean'
  };
  var Direction = {
    NEXT: 'next',
    PREV: 'prev',
    LEFT: 'left',
    RIGHT: 'right'
  };
  var Event = {
    SLIDE: "slide" + EVENT_KEY,
    SLID: "slid" + EVENT_KEY,
    KEYDOWN: "keydown" + EVENT_KEY,
    MOUSEENTER: "mouseenter" + EVENT_KEY,
    MOUSELEAVE: "mouseleave" + EVENT_KEY,
    TOUCHEND: "touchend" + EVENT_KEY,
    LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
    CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
  };
  var ClassName = {
    CAROUSEL: 'carousel',
    ACTIVE: 'active',
    SLIDE: 'slide',
    RIGHT: 'carousel-item-right',
    LEFT: 'carousel-item-left',
    NEXT: 'carousel-item-next',
    PREV: 'carousel-item-prev',
    ITEM: 'carousel-item'
  };
  var Selector = {
    ACTIVE: '.active',
    ACTIVE_ITEM: '.active.carousel-item',
    ITEM: '.carousel-item',
    NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
    INDICATORS: '.carousel-indicators',
    DATA_SLIDE: '[data-slide], [data-slide-to]',
    DATA_RIDE: '[data-ride="carousel"]'
    /**
     * ------------------------------------------------------------------------
     * Class Definition
     * ------------------------------------------------------------------------
     */
 
  };
 
  var Carousel =
  /*#__PURE__*/
  function () {
    function Carousel(element, config) {
      this._items = null;
      this._interval = null;
      this._activeElement = null;
      this._isPaused = false;
      this._isSliding = false;
      this.touchTimeout = null;
      this._config = this._getConfig(config);
      this._element = $$$1(element)[0];
      this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0];
 
      this._addEventListeners();
    } // Getters
 
 
    var _proto = Carousel.prototype;
 
    // Public
    _proto.next = function next() {
      if (!this._isSliding) {
        this._slide(Direction.NEXT);
      }
    };
 
    _proto.nextWhenVisible = function nextWhenVisible() {
      // Don't call next when the page isn't visible
      // or the carousel or its parent isn't visible
      if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
        this.next();
      }
    };
 
    _proto.prev = function prev() {
      if (!this._isSliding) {
        this._slide(Direction.PREV);
      }
    };
 
    _proto.pause = function pause(event) {
      if (!event) {
        this._isPaused = true;
      }
 
      if ($$$1(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
        Util.triggerTransitionEnd(this._element);
        this.cycle(true);
      }
 
      clearInterval(this._interval);
      this._interval = null;
    };
 
    _proto.cycle = function cycle(event) {
      if (!event) {
        this._isPaused = false;
      }
 
      if (this._interval) {
        clearInterval(this._interval);
        this._interval = null;
      }
 
      if (this._config.interval && !this._isPaused) {
        this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
      }
    };
 
    _proto.to = function to(index) {
      var _this = this;
 
      this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
 
      var activeIndex = this._getItemIndex(this._activeElement);
 
      if (index > this._items.length - 1 || index < 0) {
        return;
      }
 
      if (this._isSliding) {
        $$$1(this._element).one(Event.SLID, function () {
          return _this.to(index);
        });
        return;
      }
 
      if (activeIndex === index) {
        this.pause();
        this.cycle();
        return;
      }
 
      var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
 
      this._slide(direction, this._items[index]);
    };
 
    _proto.dispose = function dispose() {
      $$$1(this._element).off(EVENT_KEY);
      $$$1.removeData(this._element, DATA_KEY);
      this._items = null;
      this._config = null;
      this._element = null;
      this._interval = null;
      this._isPaused = null;
      this._isSliding = null;
      this._activeElement = null;
      this._indicatorsElement = null;
    }; // Private
 
 
    _proto._getConfig = function _getConfig(config) {
      config = _extends({}, Default, config);
      Util.typeCheckConfig(NAME, config, DefaultType);
      return config;
    };
 
    _proto._addEventListeners = function _addEventListeners() {
      var _this2 = this;
 
      if (this._config.keyboard) {
        $$$1(this._element).on(Event.KEYDOWN, function (event) {
          return _this2._keydown(event);
        });
      }
 
      if (this._config.pause === 'hover') {
        $$$1(this._element).on(Event.MOUSEENTER, function (event) {
          return _this2.pause(event);
        }).on(Event.MOUSELEAVE, function (event) {
          return _this2.cycle(event);
        });
 
        if ('ontouchstart' in document.documentElement) {
          // If it's a touch-enabled device, mouseenter/leave are fired as
          // part of the mouse compatibility events on first tap - the carousel
          // would stop cycling until user tapped out of it;
          // here, we listen for touchend, explicitly pause the carousel
          // (as if it's the second time we tap on it, mouseenter compat event
          // is NOT fired) and after a timeout (to allow for mouse compatibility
          // events to fire) we explicitly restart cycling
          $$$1(this._element).on(Event.TOUCHEND, function () {
            _this2.pause();
 
            if (_this2.touchTimeout) {
              clearTimeout(_this2.touchTimeout);
            }
 
            _this2.touchTimeout = setTimeout(function (event) {
              return _this2.cycle(event);
            }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
          });
        }
      }
    };
 
    _proto._keydown = function _keydown(event) {
      if (/input|textarea/i.test(event.target.tagName)) {
        return;
      }
 
      switch (event.which) {
        case ARROW_LEFT_KEYCODE:
          event.preventDefault();
          this.prev();
          break;
 
        case ARROW_RIGHT_KEYCODE:
          event.preventDefault();
          this.next();
          break;
 
        default:
      }
    };
 
    _proto._getItemIndex = function _getItemIndex(element) {
      this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM));
      return this._items.indexOf(element);
    };
 
    _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
      var isNextDirection = direction === Direction.NEXT;
      var isPrevDirection = direction === Direction.PREV;
 
      var activeIndex = this._getItemIndex(activeElement);
 
      var lastItemIndex = this._items.length - 1;
      var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
 
      if (isGoingToWrap && !this._config.wrap) {
        return activeElement;
      }
 
      var delta = direction === Direction.PREV ? -1 : 1;
      var itemIndex = (activeIndex + delta) % this._items.length;
      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
    };
 
    _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
      var targetIndex = this._getItemIndex(relatedTarget);
 
      var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]);
 
      var slideEvent = $$$1.Event(Event.SLIDE, {
        relatedTarget: relatedTarget,
        direction: eventDirectionName,
        from: fromIndex,
        to: targetIndex
      });
      $$$1(this._element).trigger(slideEvent);
      return slideEvent;
    };
 
    _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
      if (this._indicatorsElement) {
        $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
 
        var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
 
        if (nextIndicator) {
          $$$1(nextIndicator).addClass(ClassName.ACTIVE);
        }
      }
    };
 
    _proto._slide = function _slide(direction, element) {
      var _this3 = this;
 
      var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
 
      var activeElementIndex = this._getItemIndex(activeElement);
 
      var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
 
      var nextElementIndex = this._getItemIndex(nextElement);
 
      var isCycling = Boolean(this._interval);
      var directionalClassName;
      var orderClassName;
      var eventDirectionName;
 
      if (direction === Direction.NEXT) {
        directionalClassName = ClassName.LEFT;
        orderClassName = ClassName.NEXT;
        eventDirectionName = Direction.LEFT;
      } else {
        directionalClassName = ClassName.RIGHT;
        orderClassName = ClassName.PREV;
        eventDirectionName = Direction.RIGHT;
      }
 
      if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
        this._isSliding = false;
        return;
      }
 
      var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
 
      if (slideEvent.isDefaultPrevented()) {
        return;
      }
 
      if (!activeElement || !nextElement) {
        // Some weirdness is happening, so we bail
        return;
      }
 
      this._isSliding = true;
 
      if (isCycling) {
        this.pause();
      }
 
      this._setActiveIndicatorElement(nextElement);
 
      var slidEvent = $$$1.Event(Event.SLID, {
        relatedTarget: nextElement,
        direction: eventDirectionName,
        from: activeElementIndex,
        to: nextElementIndex
      });
 
      if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.SLIDE)) {
        $$$1(nextElement).addClass(orderClassName);
        Util.reflow(nextElement);
        $$$1(activeElement).addClass(directionalClassName);
        $$$1(nextElement).addClass(directionalClassName);
        $$$1(activeElement).one(Util.TRANSITION_END, function () {
          $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
          $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
          _this3._isSliding = false;
          setTimeout(function () {
            return $$$1(_this3._element).trigger(slidEvent);
          }, 0);
        }).emulateTransitionEnd(TRANSITION_DURATION);
      } else {
        $$$1(activeElement).removeClass(ClassName.ACTIVE);
        $$$1(nextElement).addClass(ClassName.ACTIVE);
        this._isSliding = false;
        $$$1(this._element).trigger(slidEvent);
      }
 
      if (isCycling) {
        this.cycle();
      }
    }; // Static
 
 
    Carousel._jQueryInterface = function _jQueryInterface(config) {
      return this.each(function () {
        var data = $$$1(this).data(DATA_KEY);
 
        var _config = _extends({}, Default, $$$1(this).data());
 
        if (typeof config === 'object') {
          _config = _extends({}, _config, config);
        }
 
        var action = typeof config === 'string' ? config : _config.slide;
 
        if (!data) {
          data = new Carousel(this, _config);
          $$$1(this).data(DATA_KEY, data);
        }
 
        if (typeof config === 'number') {
          data.to(config);
        } else if (typeof action === 'string') {
          if (typeof data[action] === 'undefined') {
            throw new TypeError("No method named \"" + action + "\"");
          }
 
          data[action]();
        } else if (_config.interval) {
          data.pause();
          data.cycle();
        }
      });
    };
 
    Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
      var selector = Util.getSelectorFromElement(this);
 
      if (!selector) {
        return;
      }
 
      var target = $$$1(selector)[0];
 
      if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
        return;
      }
 
      var config = _extends({}, $$$1(target).data(), $$$1(this).data());
      var slideIndex = this.getAttribute('data-slide-to');
 
      if (slideIndex) {
        config.interval = false;
      }
 
      Carousel._jQueryInterface.call($$$1(target), config);
 
      if (slideIndex) {
        $$$1(target).data(DATA_KEY).to(slideIndex);
      }
 
      event.preventDefault();
    };
 
    _createClass(Carousel, null, [{
      key: "VERSION",
      get: function get() {
        return VERSION;
      }
    }, {
      key: "Default",
      get: function get() {
        return Default;
      }
    }]);
    return Carousel;
  }();
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */
 
 
  $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
  $$$1(window).on(Event.LOAD_DATA_API, function () {
    $$$1(Selector.DATA_RIDE).each(function () {
      var $carousel = $$$1(this);
 
      Carousel._jQueryInterface.call($carousel, $carousel.data());
    });
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   */
 
  $$$1.fn[NAME] = Carousel._jQueryInterface;
  $$$1.fn[NAME].Constructor = Carousel;
 
  $$$1.fn[NAME].noConflict = function () {
    $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
    return Carousel._jQueryInterface;
  };
 
  return Carousel;
}($);
 
/**
 * --------------------------------------------------------------------------
 * Bootstrap (v4.0.0): collapse.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 13:47 6
yura0103, Вы этот скрипт на всех страницах подключаете? Подключать не нужно, если реализован функционал одностраничного web приложения или при переходах заменяется контент секций.
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 13:59  [ТС] 7
нет . я к каждой странице подключаю через includ файл footer? А в нем подключаю js
Javascript
1
2
3
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 14:03 8
Цитата Сообщение от yura0103 Посмотреть сообщение
я к каждой странице подключаю через includ файл footer
откройте консоль и посмотрите, не ли ошибок подключения.
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 14:12  [ТС] 9
ошибок нет
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 14:20 10
yura0103, т.е. в элементах эти скрипты есть? И ещё, переходы с перезагрузкой страниц осуществляются?
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 14:50  [ТС] 11
В элементах есть. Слайд дергается. страница не перезагружается.

Добавлено через 2 минуты
В документации bootstrap вот что сказано :
Как это работает
«Карусель» - это слайд-шоу для отображения серии содержимого, созданная на основе CSS 3D-трансформаций и немного на JS. Она работает с текстом, изображениями или обычной разметкой. Она также поддерживает кнопки “next/prev”.

В браузерах с поддержкой API видимости страниц элементы карусели не будут сменяться, когда страница невидима пользователю (например, когда вкладка браузера неактивна, или окно браузера «минимизировано» - кнопка «квадратик» слева от крестика «закрыть браузер», и т.д.).

Пожалуйста, знайте, что вложенные карусели не поддерживаются, а карусели в целом не очень желательны «стандартам доступности».

В итоге, если вы используете карусели BS4, это требует подключения util.js.

Я не могу понять что значит не поддерживается вложенность ?
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 14:55 12
Цитата Сообщение от yura0103 Посмотреть сообщение
Слайд дергается
а на главной тоже дёргается?
Цитата Сообщение от yura0103 Посмотреть сообщение
страница не перезагружается
при переходе страница НЕ перезагружается, верно?
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 15:02  [ТС] 13
на главной все идеально (https://vrabote.wsveles.com) А вот на этой не работает (https://vrabote.wsveles.com/portfolio/dveri/)
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 15:09 14
Цитата Сообщение от yura0103 Посмотреть сообщение
на главной
нет второго изображения. На
Цитата Сообщение от yura0103 Посмотреть сообщение
только одно изображение. Может в этом дело?
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 15:18  [ТС] 15
картинки есть они в CSS назначены
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
.sl-1{
    background: url("/images/service/SLIDE-1.jpg") no-repeat  center fixed;
    background-size: cover;
    padding: 0px;
    margin: 0px;
}
.sl-2{
    background: url("/images/service/SLIDE-3.jpg") no-repeat  center fixed;
    background-size: cover;
    padding: 0px;
    margin: 0px;
}
.sl-3{
    background: url("/images/service/SLIDE-4.jpg") no-repeat  center fixed;
    background-size: cover;
    padding: 0px;
    margin: 0px;
}
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 15:37 16
yura0103, на главной у Вас есть <div class="carousel-inner">, а где двери не нашёл этого дива. Вам нужно внимательно прошерстить DOM, чтобы нужные элементами были на своих местах.
0
6 / 6 / 4
Регистрация: 20.10.2014
Сообщений: 392
19.08.2019, 15:59  [ТС] 17
вроде класс есть
Миниатюры
Не работает слайдер на некоторых страницах  
0
634 / 476 / 170
Регистрация: 26.05.2016
Сообщений: 2,638
19.08.2019, 16:09 18
Цитата Сообщение от yura0103 Посмотреть сообщение
вроде класс есть
да, действительно есть, не увидел. Ну тогда не знаю, там такая каша в стилях, а если в js полезть... Ох уж этот bootstrap
0
19.08.2019, 16:09
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
19.08.2019, 16:09
Помогаю со студенческими работами здесь

на некоторых страницах съезжает div
на некоторых страницах съезжают div'ы и я не могу понять причины, а как следствие и методов...

Обнаружение вируса на некоторых страницах сайта
Всем привет! Давненько на сайте поселился вирус. Нод32 блокирует картинки и файлы которые лежат в...

Выпадающее меню не видно на некоторых страницах
Сделал выпадающее меню, но на страницах где под меню слайдер и div с бэкграундом, этого выпадающего...

Запрет запуска кода на некоторых страницах
Здравствуйте. У меня в вордпрессе стоит слайдер &lt;!-- slider --&gt; &lt;?php if...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
18
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru